WASHINGTON — At the end of a week of frustrating developments for the White House, at home and overseas, President Barack Obama took time Friday afternoon to vent.

The president revealed a long list of gripes in a nearly 50-minute news conference: a recalcitrant Congress that is refusing to deliver the emergency border funding bill he requested; crises in the Middle East and Ukraine that defy quick or simple solutions; even a press corps that neglected to wish him a happy birthday.

For a president who has shown signs of second-term fatigue and disillusionment, the question-and-answer session was a display of Obama’s exasperation with the limits of his power and the burden of outsize expectations.

“It kind of will be seen in history as his ‘I’m sick of the gridlock’ press conference,” said Douglas G. Brinkley, a presidential historian. “It’s a president that feels that he has no more patience with Congress’ shenanigans and what he considers the politics of the moment.”

“There’s a frustration in the second term, and there’s a bit of a scolding feel here,” Brinkley added. “He’s the president that promised to keep us out of foreign wars and get the economy going, and he’s done that, but people are still nit-picking.”

The news conference started on a cheery note as Obama opened with the day’s economic news of strong job growth. “Things are better,” he said. “Our engines are revving a little bit louder.”

But it soured from there. The president complained of “really unfair criticism” leveled at Secretary of State John Kerry for his efforts to reach a cease-fire between Israel and Hamas in Gaza and gave a pessimistic prognosis for restoring the most recent truce, which broke down Friday 90 minutes after it began.

“It’s difficult, and I don’t think we should pretend otherwise,” Obama said of the conflict.

It was a sentiment he returned to on a range of issues.

Obama lamented congressional dysfunction in which, he said, “even basic common-sense, plain-vanilla legislation can’t pass because House Republicans consider it somehow a compromise of their principles or giving Obama a victory.”

He bristled at criticism of his foreign policy, saying, “Apparently, people have forgotten that America, as the most powerful country on earth, still does not control everything around the world.”

He complained about trying to change people who do not want to change themselves. “We can leave them to resolve some of the technical issues and to show them a path, but they’ve got to want it,” Obama said of the Israelis and the Palestinians.

He spoke of the limits of his influence in Ukraine. “Short of going to war, there are going to be some constraints in terms of what we can do if President Putin and Russia are ignoring what should be their long-term interests,” he said.

Even when he returned to the happier news of the economy, Obama was in a defensive crouch, saying that if he had held a similar news conference in his first term, the questions would all have been about the lack of jobs and sluggish housing market.

“Well, you know what?” the president said. “What we did worked, and the economy’s better. It shows you that if you stay at it, eventually we make some progress.”

Jon Favreau, a former speechwriter for Obama, said the president was not necessarily in a foul humor. “He was clearly in a mood of, ‘I’m going to sit here and take all the questions there are,’” Favreau said. “To me, it was less frustration and more just sort of telling it like it is: This is the Congress we have, this is the situation we’re in, this is the mindless partisanship we’re facing, and I’m going to keep trying.”

Still, for a president who once campaigned on hope and change, Obama’s talk of trying had a distinctly pessimistic edge.

“It’s going to be very hard to put a cease-fire back together again if Israelis and the international community can’t feel confident that Hamas can follow through on a cease-fire commitment,” he said.

Obama also suggested that he and his team had been over-criticized and underappreciated merely for taking on a role in the world that no other nation would bother to play. “There shouldn’t be a bunch of complaints and second-guessing about, ‘Well, it hasn’t happened yet,’ or nit-picking before he’s had a chance to complete his efforts,” he said of Kerry. “Because, I tell you what, there isn’t any other country that’s going in there and making those efforts.”

The president briefly broke the dour mood of the news conference with a mention of his birthday Monday — by way of a playful complaint.

“I thought that you guys were going to ask me how I was going to spend my birthday,” Obama said. “What happened to the ‘Happy Birthday’ thing?”