WASHINGTON—President Trump backed Rudy Giuliani a day after saying he wasn’t sure if he was still his personal lawyer.

“He may seem a little rough around the edges sometimes, but he is also a great guy and wonderful lawyer,” Mr. Trump said on Twitter Saturday, praising Mr. Giuliani’s tenure as mayor of New York City.

Later Saturday, the president was asked during a call-in interview with Jeanine Pirro on Fox News if Mr. Giuliani was still his attorney. Mr. Trump replied: “Yes, and he’s a great gentleman, he was a great mayor.”

The two men lunched together Saturday at Mr. Trump’s Virginia golf club, according to a person familiar with the matter. When asked to comment on the lunch, Mr. Giuliani referred to the president’s tweet. The White House had no immediate comment.

On Friday, before departing for a rally in Louisiana, the president appeared to equivocate over whether Mr. Giuliani continued to represent him. “Well, I don’t know. I haven’t spoken to Rudy. I spoke to him yesterday, briefly. He’s a very good attorney, and he has been my attorney. Yeah, sure,” Mr. Trump said in response to a question by a reporter.