June is shaping up as a time of reckoning for President Barack Obama — and his legacy.

Over the next three weeks, he could record significant wins on three of his most ambitious initiatives. Or have each of them blow up in his face.

And those outcomes are largely outside of the president's control.

On Capitol Hill, lawmakers in the House are nearing a make-or-break vote on Obama's broad Pacific Rim free trade deal with 11 other countries. At the Supreme Court, the nine justices will soon rule on a crucial provision in the president's landmark 2010 health-care law, with the insurance plans of more than 6 million people in the balance. And in Geneva, U.S. and Iranian diplomats face a June 30 deadline to announce a deal on the future of Tehran's nuclear program.

A string of victories would provide the administration political momentum heading into the final stretch of Obama's presidency, as he begins to frame the story of his administration after years of fierce combat with Republicans. A string of losses would undermine the White House's message of transformational progress just as the 2016 campaign for his successor heats up and his presidency is examined in the crucible of an election season.

"This is a consequential time for the administration," said Simon Rosenberg, founder of NDN, a liberal think tank. "It's reflective of the fact that Obama has been a very ambitious president, which sometimes runs counter to the D.C. media narrative."

The hurdles facing the administration are distinct and unpredictable, and inside the West Wing, Obama aides have compartmentalized their fight on each front. Teams of policy experts and political advisers are strategizing, working through various contingencies independently. Aides say that although the outcomes of these efforts may affect the president's legacy, they have not changed their approach to how they pursued his agenda earlier in his tenure.

But White House allies acknowledged that the president and his advisers are acutely aware of the stakes. The health-care law is considered Obama's signature domestic policy achievement, the trade accord is central to his economic agenda, and the Iran nuclear deal could reshape the security environment in the Middle East and stand as his defining foreign policy success.

"People are conscious of it. These are hugely consequential inflection points on the substance of his presidency," said one former White House official, who spoke on the condition of anonymity to discuss his former colleagues freely.

Julie Smith, a former national security adviser to Vice President Biden, called the summer "determinative" for the president's agenda. "A lot of what hangs in the balance will be determined in the next couple of weeks," she said.

Obama has projected confidence as he wields the powers of the presidency to influence the debate where he can. He invited a handful of Democratic lawmakers who support his trade initiative to accompany him on Air Force One to a summit with European leaders in Germany this week.

The House plans to vote by next week on legislation, which the Senate has approved, that would give Obama additional authority to complete the Trans-Pacific Partnership. The president has called the accord a linchpin in his bid to ensure that the United States remains the world's dominant economic power in the face of China's rise.

It marks a rare chance for Obama to show he can work with the GOP, which largely supports his push, but he faces intense opposition from labor unions and progressive Democrats.

"I'm not going to hypothesize about not getting it done," he said Monday during a news conference in Germany. "I intend to get it done."

On health care, Obama was equally defiant. The Supreme Court is considering in King v. Burwell whether to strike down government subsidies for people who purchase coverage on the federal health insurance exchange. Obama on Monday called such an interpretation a "contorted reading" of the Affordable Care Act, and added that the case "probably shouldn't have even been taken up" by the court.

The administration has insisted that there is no backup plan if the court strikes down the subsidies, which could force 6.4 million Americans to lose their insurance. Both sides on Capitol Hill are preparing for a political blame game if that happens. During an appearance Tuesday at the Catholic Health Association in Washington, Obama cast the health law as "woven into the fabric of America."

"There's something deeply cynical about the ceaseless partisan attempts to roll back progress," he said. "You'd think it was time to move on."

If the court guts the law, "it would be a terrible thing," said Neera Tanden, president of the Center for American Progress, a liberal think tank. "But from the perspective of the parties, it would completely galvanize Democrats to make the Supreme Court a massive issue in the election."

On the flip side, a loss for Obama in the courts would buoy Republicans who have denounced the law as a costly program that will impede the nation's economic growth.

"Instead of jousting with reality again, perhaps he'll consider the concerns of the constituents who write in every day to tell us how this law is hurting them," Senate Majority Leader Mitch McConnell, R-Ky., said Tuesday.

(Separately, the administration is locked in a protracted court battle over Obama's executive actions on immigration. The legal fight has halted a program to defer the deportation of millions of illegal immigrants, another signature presidential initiative. A federal appeals court hearing is scheduled for early July in New Orleans.)

The issue of Iran's nuclear capability also came up during Obama's meetings in Germany. White House aides have emphasized that he does not consider the June 30 deadline a soft target that could be pushed back more than a few days if an agreement is still being finalized.

"Iran has a historic opportunity to resolve the international community's concerns about its nuclear program, and we agreed that Iran needs to seize that opportunity," Obama said after meeting with his European counterparts.

The president has invested significant political capital in preserving the framework of the tentative deal that would scale back Tehran's nuclear program for 10 to 15 years, slowing Iran's ability to produce a nuclear weapon, according to the administration. Republicans and some Democrats, as well as Israeli Prime Minister Benjamin Netanyahu, have denounced the agreement and argued that Washington is foolish to trust Tehran.

Robert Dallek, a presidential historian, said that no matter how these initiatives fare over the next several weeks, it will take years to evaluate whether Obama ultimately achieves his policy goals. Still, Dallek said, presidents naturally become more preoccupied with their legacy as they approach the end of their second term.

"They're very mindful of what history's going to say about them, and they're eager to shape how history views them," he said.

And for White House staff members, who have experienced significant turnover, the ticking clock adds to the anxiety as they race to lock in the president's most ambitious initiatives.

"People who have been there a long time start thinking, 'Oh my gosh, I wish we could get this over with,' " said Joseph Hagin, who served as deputy chief of staff for President George W. Bush from 2001 to 2008. "People are tired, people are leaving, and it's depressing to the people who are staying. It's really this summer when people start to realize it's coming to a close. But you've still got to be on your game."