President Trump said Saturday that Democrats challenging Rep. Nancy Pelosi as Speaker of the House are “harassing her” and that he will get her Republican votes for the top job if needed.

“I would help Nancy Pelosi if she needs some votes,” Mr. Trump said at the White House as he left for California to view wildfire damage. “She may need some votes. I will perform a wonderful service for her. I like her, can you believe it?”

Mr. Trump even named a Republican lawmaker, Rep. Tom Reed of New York, as someone who might be persuaded to vote for Mrs. Pelosi as speaker.

“He’s a fine man, a congressman. I would call him a moderate,” Mr. Trump said.

Mrs. Pelosi is facing a potential challenge from Rep. Marcia Fudge, Ohio Democrat and a former chair of the Congressional Black Caucus. They met Friday at the Capitol.

More than 60 current and incoming female Democratic lawmakers are pledging their support for Mrs. Pelosi as speaker.

Mr. Trump said Democrats are “playing games with her, just like they’ll be playing with me. It’s called presidential harassment.”

“She’s tough and she’s smart, but she deserves to be speaker,” Mr. Trump said. “In a way, her own party is harassing her. There’s nobody else who can be speaker. If she needs any votes, if she asks me, I will give her the votes to put her over the top. So tell her opposition, they’re wasting their time.”