It all started with donations

In the declaration filed on November 20, Senator Dastyari wrote "support for settlement of outstanding legal matter".

That reportedly cost $40,000.

In the same year, he stated the Australia China Relations Institute had paid to cater an afternoon tea.

And a 15-day trip to China, with flights, accommodation and hospitality, was funded by the Australian Fellowship of China Guangdong Associations Incorporated.

But pressure started to mount in August 2016, when it was revealed by the ABC the senator had allowed Sydney-based Top Education Institute to pay for a $1,670.82 travel bill after he went over his Parliamentary travel budget.

The payment had been disclosed in accordance with the rules.

But the company has links to the Chinese Government, and is said to recommend the training provider.

Last month, audio was released of him defying Labor's policy on the South China Sea

He stood next to Mr Huang — an ALP donor — and backed the Chinese Government's refusal to abide by international court rulings on the disputed territory.

He was quoted as saying:

"The Chinese integrity of its borders is a matter for China.

"The role that Australia should be playing as a friend is to know that we see several thousand years of history, thousands of years of history, where it is and isn't our place to be involved.

"And as a supporter of China, and a friend of China, the Australian Labor Party is playing an important role in maintaining that relationship.

"And the best way of maintaining that relationship is knowing when it is and isn't our place to be involved."

The comments were in stark contrast to his claims that he had been "misreported" by Chinese media and to those made by fellow senator and defence spokesman Stephen Conroy just a day earlier.

In June this year, the ABC reported Mr Huang had promised to give $400,000 to the Labor Party, but cancelled the donation when he heard what Senator Conroy had said.

The same day, Fairfax Media reported the senator had also warned Mr Huang his phone was being tapped by US agencies in a secret face-to-face meeting in October.

That meeting allegedly occurred after Senator Dastyari quit the frontbench in September 2016 and after senior Labor officials had received briefings from ASIO that Mr Huang was of interest to the agency over his opaque links to the Chinese Government.

This week, allegations came out he pressured Tanya Plibersek not to meet a Chinese activist

This story first emerged when senator Cory Bernardi referred to a matter where an "ALP member" had received a phone call from an ALP colleague "and begged them not to go" to a meeting with a Chinese activist.

Australian Story later asked the senator if the ALP member in Senator Bernardi's anecdote was him.

Fairfax said it established Senator Bernardi's account was inaccurate, and that Senator Dastyari didn't speak directly to Ms Plibersek.

But its investigation found he "repeatedly" attempted to warn her that her meetings in Hong Kong, "would upset figures in the Chinese community in Australia … he left messages on her phone and contacted her office multiple times".

He again denied the claims.

It came just one week after Attorney-General George Brandis asked the Senate's Privileges Committee to investigate whether Senator Dastyari had broken the rules governing MPs' conduct.

The pressure on Senator Dastyari began to build

Environment Minister Josh Frydenberg told RN the "Dastyari itch" would become an outbreak, "engulfing the whole of the Labor Party" unless he was axed.

"I do think his judgement was erroneous and he did make a significant mistake of judgement, and that is why I have sacked him again," he said.

However, some of his colleagues praised his decision to leave.

"Today Sam Dastyari again showed his commitment and loyalty to his party by taking his own difficult decision to resign. A great loss for Labor," Joel Fitzgibbon tweeted.

"Amidst all the criticism today let’s not forget the contribution he's made to Australia by shining a light on multinational tax avoidance, banking scandals and unfairness and injustice in our society which should trouble us all," Jim Chalmers tweeted.

Following Senator Dastyari's resignation, Mr Shorten said in a statement he could be proud of his achievements in the Senate.

"Sam Dastyari is a good, decent and loyal Australian, and an effective parliamentarian, but his judgement has let him down and now he has paid the heaviest price," he said.

Senator Dastyari said the Labor Party would have time to find a replacement for him before Parliament returns next year.