Rudy Giuliani said Thursday that he will join President Trump’s legal team and hopes to bring an end to the special counsel’s investigation into Russian election meddling in “a week or two.”

“I’m going to join the legal team to try to bring this to a resolution,” Giuliani told The Post.

“The country deserves it. I’ve got great admiration for President Trump.

“I’ve had a long relationship with Bob Mueller. I have great respect for him. He’s done a good job.”

Giuliani, a former US Attorney, served as New York City’s mayor when Mueller was the FBI director.

“I don’t know yet what’s outstanding. But I don’t think it’s going to take more than a week or two to get a resolution. They’re almost there.

“I’m going to ask Mueller, ‘What do you need to wrap it up?’” he said.

The president’s effort to beef up his team following the resignation of John Dowd was slowed because of rapidly moving events abroad, including the Syrian civil war and negotiations with North Korea, according to The Daily Beast.

Giuliani is a staunch ally and frequent defender of the president, whom he has known for decades.

“What I did for New York City, Donald Trump will do for America,” the former mayor said at the Republican National Convention in Cleveland in the summer of 2016.

“I have known Donald Trump for almost 30 years. And he has created and accomplished great things. But beyond that this is a man with a big heart. Every time New York City suffered a tragedy, Donald Trump was there to help.”

Giuliani will work with lawyers Ty Cobb and Jay Sekulow.