President Obama spoke during a visit to Ellicott Dredges during his second 'Middle Class Jobs and Opportunity Tour' in Baltimore, Maryland May 17, 2013. (KEVIN LAMARQUE/REUTERS)

President Obama insisted Friday that he is focused on improving the lives of middle-class Americans, despite being buffeted in Washington by a trio of controversies that have threatened to distract him from his second-term agenda.

Capping one of the most difficult weeks of his tenure, Obama ventured outside the Capital Beltway to try to change the subject from his administration’s problems and refocus attention on his efforts to create middle-class jobs. He toured an elementary school, a manufacturing plant and a community center.

“I know it can seem frustrating sometimes when it seems like Washington’s priorities aren’t the same as your priorities,” Obama told a crowd at the Ellicott Dredges facility. “Others may get distracted by chasing every fleeting issue that passes by. But the middle class will always be my number one focus, period. Your jobs, your families, your communities, that’s why I ran for president.”

It’s not clear whether Obama was referring directly to the three controversies that have put the White House on the defensive this week: the Internal Revenue Service’s targeting of conservative groups; the Justice Department’s secret move to seize private phone records from the Associated Press; and the imbroglio over the administration’s talking points about the terror attack in Benghazi, Libya, in the fall.

But the president seemed to be relieved to be out of Washington and on more friendly terrain — a campaign-style event with supporters who included Maryland Gov. Martin O’Malley (D) and House Minority Whip Steny H. Hoyer (D-Md.).

It was a far different scene from a day earlier, when Obama stood in the rain in the Rose Garden and answered questions about whether it was fair that his administration was being compared to that of President Richard M. Nixon and whether he still had confidence in Attorney General Eric H. Holder Jr.

Forty miles from Pennsylvania Avenue, Obama seemed eager to blame Congress for standing in his way.

He began to suggest that lawmakers had not funded his priorities in high-tech development: “We’ve had some trouble out of Congress . . .

Someone in the audience hooted.

“I know, it’s surprising, isn’t it?” Obama said sarcastically.

Hoyer said the president appeared “at ease” during the tour.

The president referred to a drawing lesson he worked on at Moravia Park Elementary, where he said he sketched a tiger. “The kids were not impressed,” Obama joked. “They kind of looked at it, they said, ‘That doesn’t look like a tiger.’ ”

Hoyer said the president was smart to “focus on substance” in order to get past the controversies in Washington.

“It’s a distraction,” Hoyer said of the problems facing the administration. “It’s a purposeful distraction because Republicans do not have consensus. And the result of having no consensus is that you have no agenda, so you’re distracting the American public and focusing on things like that.”

This was the second of the president’s “Middle Class Jobs & Opportunity Tours,” which started last week in Austin.

In Baltimore, he announced he had signed a memorandum to speed up permits for infrastructure projects, which he said would help get more unemployed workers back on the job.

But even at the Ellicott Dredges plant, Obama couldn’t escape the partisan politics of Washington. The company’s owner, Peter Bowe, who accompanied the president on the factory tour, had testified a day earlier in Congress in support of the Keystone XL oil sands pipeline, which Republicans have said will create jobs.

Many Democrats oppose the project on environmental grounds, and the Obama administration is expected to issue a ruling on the pipeline in the coming months.

As he wrapped up his remarks, Obama urged the crowd to “keep plugging away, keep fighting, and we’ll build an even better America.”

“We’re praying!” someone in the audience shouted.

“And we can pray, too,” the president concurred. “We’ll add that in there.”

Discuss this topic and other political issues in the politics discussion forums.