President Obama said on Monday that if he were in Representative Anthony D. Weiner’s position, “I would resign,” according to NBC, which conducted an extensive interview with him.

Mr. Obama called Mr. Weiner’s conduct “highly inappropriate” and said the New York Democrat had “embarrassed himself” and his family.

He stopped short of demanding that Mr. Weiner, 46, leave, but said: “I can tell you that if it was me, I would resign. Because public service is exactly that: it’s a service to the public.” He strongly suggested that it would be in the best interests of Mr. Weiner and his constituents if the congressman were to step aside.

“When you get to the point where, because of various personal distractions, you can’t serve as effectively as you need to at the time when people are worrying about jobs and their mortgages and paying the bills, then you should probably step back,” Mr. Obama said.

Philip Scott Andrews/The New York Times

Mr. Weiner has faced calls for his resignation from a growing list of top Democrats, including the House minority leader, Nancy Pelosi of California, and Representative Debbie Wasserman Schultz of Florida, the chairwoman of the Democratic National Committee.

But until Monday, the White House had limited its involvement, calling Mr. Weiner a “distraction.”

A spokesman for Mr. Weiner declined to comment.

At the Capitol on Monday, Ms. Pelosi for the first time described the consequences Mr. Weiner would face if he did not resign: loss of committee assignments.

“We are asking him to leave,” she said. “If we are asking him to leave, we are certainly not going to welcome him here with committee assignments.”

Mr. Weiner has a seat on the Energy and Commerce Committee, which has jurisdiction over telecommunications, environmental protection, health and energy policy, as well as interstate and foreign commerce. He also sits on the Judiciary Committee.

Mr. Weiner, a seven-term representative from Brooklyn and Queens, is said to have entered a treatment center to deal with a pattern of reckless online behavior, which included sending racy photographs and salacious messages to at least six women over the past three years. He was granted a two-week leave of absence from the House on Monday.

In the latest report, he appeared to have sent a woman photographs of himself in the locker room of a gym for House members, suggesting that some of his online flirtation occurred on federal property.

The subject of Mr. Weiner is expected to take center stage on Tuesday when the House resumes business after a weeklong recess and Democrats convene their weekly caucus meeting.

Raymond Hernandez contributed reporting from Washington.