US President Donald Trump bid farewell to 2017 with a lavish party at his private club in Florida, before kicking off 2018 with angry tweets about Iran and Pakistan.

Mr Trump attacked Pakistan, tweeting: “The United States has foolishly given Pakistan more than 33 billion dollars in aid over the last 15 years, and they have given us nothing but lies & deceit, thinking of our leaders as fools. They give safe haven to the terrorists we hunt in Afghanistan, with little help. No more!”

It was not immediately clear why the president decided to comment on Pakistan.

The US has long accused Islamabad of allowing militants to operate relatively freely in Pakistan’s border regions to carry out operations in neighbouring Afghanistan.

In August, the United States said it would hold up 255 million dollars (£189 million) in military assistance for Pakistan until it cracks down on extremists threatening Afghanistan.

On Iran, Mr Trump seemed to be responding to widespread anti-government protests there.

He tweeted that Iran is “failing at every level” and voiced support for the protesters, saying it is “TIME FOR CHANGE”.

While some Iranians have shared Mr Trump’s tweets, many there distrust him as he has refused to recertify the nuclear deal and because his travel bans have blocked Iranians from getting US visas.

Heading into the party at Mar-a-Lago in Palm Beach on Sunday night, Mr Trump predicted 2018 will be a “tremendous year”.

The president said the stock market will continue to rise and that companies are going to continue to come into the US at “a rapid clip”.

Donald Trump arrives for a New Year's Eve gala at his Mar-a-Lago resort (Evan Vucci/AP)
Donald Trump arrives for a New Year’s Eve gala at his Mar-a-Lago resort (Evan Vucci/AP)

He also cited several accomplishments, including the tax overhaul, opening the Arctic National Wildlife Refuge to oil drilling, and repealing the individual mandate from the national healthcare law.

Asked for his reaction to North Korea leader Kim Jong Un’s remarks about having a nuclear button on his desk, Mr Trump responded by saying: “We’ll see.”

Guests gathered in the decorated ballroom included senior White House advisers Ivanka Trump and Jared Kushner, Mr Trump’s sons Eric Trump and Donald Trump Jr and treasury secretary Steven Mnuchin.

Jared Kushner and Ivanka Trump arrive with daughter Arabella Kushner and son Joseph (Evan Vucci/AP)
Jared Kushner and Ivanka Trump arrive with daughter Arabella Kushner and son Joseph (Evan Vucci/AP)

Since taking office, President Trump has made frequent visits to his for-profit properties.

He has refused to divest from his property and hotel empire, drawing criticism from ethics experts.

Earlier in the day, Mr Trump capped 2017 with a video self-tribute touching on what he sees as the high points of his achievements and rhetoric from his first year in office.

In the three-and-a-half minute video, scenes of Mr Trump with military personnel, Border Patrol agents and other world leaders are set to a stirring soundtrack as he declares of his country: “We gave birth to the modern world and we will shape tomorrow’s world with the strength and skill of American hands.”

Mr Trump cited his success in placing a justice on the Supreme Court, his efforts to cut regulations and his big win on overhauling taxes, which he falsely described as the “largest tax cut in the history of our country”.

He offered the video with a New Year’s Eve message: “What a year it’s been, and we’re just getting started. Together, we are MAKING AMERICA GREAT AGAIN! Happy New Year!!”

The president later offered another Twitter message, loaded with his signature bombast: “As our Country rapidly grows stronger and smarter, I want to wish all of my friends, supporters, enemies, haters, and even the very dishonest Fake News Media, a Happy and Healthy New Year. 2018 will be a great year for America!”