Romney, citing his Mormon faith, was the only Republican to vote against his party and join Democrats in voting to convict Trump.

Beginning his speech at the bipartisan annual event, Trump criticized "dishonest and corrupt people" who "badly hurt our nation" -- an apparent reference to Democrats who pursued his impeachment over what they claimed was an abuse of power in holding up aid in Ukraine.

The President thanked "courageous Republican politicians and leaders (who) had the wisdom, fortitude and strength to do what everyone knows was right."

He then obliquely referenced Romney and Pelosi.

"I don't like people who use their faith as justification for doing what they know is wrong nor do I like people who say, 'I pray for you,' when they know that's not so. So many people have been hurt and we can't let that go on," Trump said.

"We have allies, we have enemies, sometimes the allies are enemies but we just don't know it. But we're changing all that," Trump later remarked.

Pelosi has previously said she prays for the President daily and Romney brought up his faith in a speech announcing his vote on impeachment. Later Thursday after the breakfast, Pelosi called Trump's remark about faith as justification for doing something wrong "completely inappropriate" and "particularly without class."

"This morning the President said when people use faith as an excuse to do ... bad things ... was just so completely inappropriate, especially at a prayer breakfast," Pelosi said at her weekly news conference.

"I don't know what the President understands about prayer or people who do pray, but we do pray for the United States of America," she said. "I pray hard for him because he's so off the track of the Constitution, our values, our country."

"He really needs our prayers, so he can say whatever he wants ... but I do pray for him and I do so sincerely and without anguish," Pelosi added.

Trump walked into the annual, bipartisan breakfast and immediately picked up the newspaper laid on his place setting, a hard copy of USA Today, with the headline "ACQUITTED." He displayed the headline to the room and to the cameras, to laughter from the audience.

Pelosi, at the news conference, said that the President's talking points were outside of religiously oriented issues was also inappropriate at the breakfast.

"To go into the stock market and raising up (the newspaper) and mischaracterizing other peoples' motivation, he's talking about things he knows little about -- faith and prayer," she said.

The President's arrival at the breakfast was soon followed by a prayer to the breakfast group by Pelosi. Pelosi prayed for the poor and the persecuted around the world. The House speaker did not bring up politics or impeachment.

"Let us pray that the names of the persecuted always live on our lips and their courage carried through our actions. And let us pray that we honor the spark and divinity in them and in all people including ourselves and that we treat everyone with dignity and respect," Pelosi said.

Prefacing Trump's speech, Dr. Arthur Brooks, discussed the "crisis of contempt and polarization that's tearing our societies apart."

He called for those at the breakfast to do what was preached in the Bible: "Love your enemies."

Brooks spoke at length about how politicians from differing parties need to treat each other with love.

"Arthur, I don't know if I agree with you," Trump told the audience after approaching the dais. "I don't know if Arthur is going to like what I'm going to have to say."

After slamming Democrats and Romney, the President celebrated the state of the American economy, his administration's policies to protect religious freedom and new guidance on school prayer and underscored the "sanctity of life."

He also highlighted his administration's threat to cut off taxpayer funding to colleges and universities that "spread the poison of anti-Semitism and bad things about Christianity."

"You better go out and vote on November 3. Because you have a lot of people out there that aren't liking what we're doing," Trump said to the group of bipartisan politicians, world leaders and religious leaders.

The President also underscored that religious Americans are "in a fight."

"Tell your congregation that ... we have 350 million people in our country. They're proud Americans, and they respect what we're doing, even those that you don't think so much, like us, respect us, want to be with us," Trump said. "They're respecting our fight. And we are in a fight. Religion in this country and religion all over the world, certain religions in particular, are under siege. We won't let that happen."

In his closing remarks, Trump praised the prayer group, but veered again into what appeared to be pushback on Brooks' call to love your enemies.

"They like people and sometimes they hate people. I'm sorry. I apologize. I'm trying to learn. It's not easy," Trump said, adding, "When they impeach you for nothing, then you're supposed to like them. It's not easy, folks. I do my best."