President Donald Trump is weakening the office of the presidency by tweeting unsubstantiated allegations, Barack Obama's defence secretary has said.

"I mean this is the President of the United States and he has the responsibility to speak the truth to the American people,” Leon Panetta told CNN.

"When he engages in these kinds of tweets and throws out these kinds of allegations, I think he weakens the office of the presidency."

Stephen Colbert on Trump's wiretapping claims: Someone get this guy a Xanax

Over the weekend, Mr Trump accused Mr Obama of wiretapping phones in Trump Tower, providing no evidence for his claim.

A spokesman for Mr Obama denied he ever ordered the wiretapping of any US citizen.

"Terrible!" Mr Trump tweeted. "Just found out that Obama had my 'wires tapped' in Trump Tower just before the victory. Nothing found. This is McCarthyism!"

He added: "Is it legal for a sitting President to be 'wire tapping' a race for president prior to an election? Turned down by court earlier. A new low!

"I'd bet a good lawyer could make a great case out of the fact that President Obama was tapping my phones in October, just prior to election!"

In pictures: Protests, pomp and Donald Trump Show all 30 1 /30 In pictures: Protests, pomp and Donald Trump In pictures: Protests, pomp and Donald Trump President-elect Donald Trump acknowledges guests as he arrives on the platform at the US Capitol in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump Donald Trump is sworn in as the 45th president of the United States by Chief Justice John Roberts as Melania Trump looks on during the 58th Presidential Inauguration at the U.S. Capitol in Washington AP In pictures: Protests, pomp and Donald Trump President Donald Trump shakes hands with Justice John Roberts after taking the oath at inauguration ceremonies swearing in Trump as the 45th president of the United States Reuters In pictures: Protests, pomp and Donald Trump President Donald Trump raises his fists after his inauguration on the West Front of the U.S. Capitol Getty In pictures: Protests, pomp and Donald Trump U.S. President-elect Donald Trump greets outgoing President Barack Obama before Trump is inaugurated during ceremonies on the Capitol in Washington Reuters In pictures: Protests, pomp and Donald Trump resident-elect Donald Trump arrives on the platform of the US Capitol in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump Attendees partake in the inauguration ceremonies to swear in Donald Trump as the 45th president of the United States at the U.S. Capitol in Washington DC Reuters In pictures: Protests, pomp and Donald Trump US President Donald Trump delivers his inaugural address during ceremonies at the US Capitol in Washington DC Getty In pictures: Protests, pomp and Donald Trump U.S. President Donald Trump waves with wife Melania during the Inaugural Parade in Washington DC Reuters In pictures: Protests, pomp and Donald Trump Protesters registered their rage against the new president Friday in a chaotic confrontation with police who used pepper spray and stun grenades in a melee just blocks from Donald Trump's inaugural parade route. Scores were arrested for trashing property and attacking officers AP In pictures: Protests, pomp and Donald Trump Demonstrators protest against US President Donald Trump in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump A woman holds a sign before the start of the Presidential Inauguration of Donald Trump at Freedom Plaza in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump Anti-Trump protesters prepare banners for a protest against the inauguration of US President-elect Donald Trump, in Berlin REUTERS In pictures: Protests, pomp and Donald Trump Demonstrators shout slogans against US President-elect Donald Trump in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump Demonstrators march, block foot traffic and clash with U.S. Capitol Police at the entry checkpoints for the Inauguration of Donald Trump Alamy Live News In pictures: Protests, pomp and Donald Trump Demonstrators display a banner as people arrive for US President-elect Donald Trump's inauguration in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump A man displays a placard as people lineup to get into the National Mall for the inauguration of US President-elect Donald Trump in Washington DC Getty Images In pictures: Protests, pomp and Donald Trump Protesters demonstrating against U.S. President Donald Trump raise their hands as they are surrounded by police on the sidelines of the inauguration in Washington DC Reuters In pictures: Protests, pomp and Donald Trump A demonstrator wearing a mask depicting Donald Trump protests outside the US Embassy in London Getty Images In pictures: Protests, pomp and Donald Trump Demonstrators hold placards as they protest outside the US Embassy in London Getty Images In pictures: Protests, pomp and Donald Trump Former US President George W. Bush and First Lady Laura Bush arrive for the Presidential Inauguration at the US Capitol Rex In pictures: Protests, pomp and Donald Trump Michelle Obama and Dr. Jill Biden share an umbrella as President Donald Trump delivers his inaugural address at the inauguration in Washington DC Rex In pictures: Protests, pomp and Donald Trump Former Democratic presidential nominee Hillary Clinton and former President Bill Clinton arrive on the West Front of the U.S. Capitol in Washington Reuters In pictures: Protests, pomp and Donald Trump U.S. Vice President Mike Pence takes the oath of office on the West Front of the U.S. Capitol in Washington, DC Getty Images In pictures: Protests, pomp and Donald Trump Advisors to President-elect Donald Trump, Kellyanne Conway and Steve Bannon depart from services at St. John's Church during the Presidential Inauguration in Washington Reuters In pictures: Protests, pomp and Donald Trump Protesters demonstrating against U.S. President Donald Trump take cover as they are hit by pepper spray by police on the sidelines of the inauguration in Washington DC Reuters In pictures: Protests, pomp and Donald Trump An activist demonstrating against U.S. President Donald Trump is helped after being hit by pepper spray on the sidelines of the inauguration in Washington DC Reuters In pictures: Protests, pomp and Donald Trump A police officer tries to tackle a protester demonstrating against U.S. President Donald Trump Reuters/Adrees Latif In pictures: Protests, pomp and Donald Trump Police arrest and detain a protester in the street in Washington DC Rex In pictures: Protests, pomp and Donald Trump A police officer falls to the ground as another shoots pepper spray at protesters demonstrating against U.S. President Donald Trump on the sidelines of the inauguration in Washington DC Reuters

Mr Penetta added: "I sense that the White House is in a bunker mentality in which they think everybody is against them and the president feeling that way is now tweeting out anything he wants to say."

Last weekend, the top House Democrat said Mr Trump's claims were "just ridiculous".

Representative Nancy Pelosi said Mr Trump is following the playbook of making something up, having the media report it and then saying everybody is writing about it.