It was June in Washington. The second-term president's party led neither house of Congress. The White House was pushing for legislation that in its basic intent had more appeal to his partisan rivals than to those in his own party -- many of whose members rebelled against the initiative.
The president was George W. Bush, and the bill would have reformed immigration laws.
Glimpsed from afar, the congressional rebuke on Friday of President Barack Obama on his Pacific trade fast-track push posed a striking parallel to that other White House defeat, eight years ago this month.
As with Bush, Obama's approval ratings were low in the next-to-last year of a second term. Like Bush, he sought a legacy-building win and fell short.
Republican Bush in June 2007 was so roundly rebuked over illegal immigration by members of his party that even important cross-partisan support from the likes of the late Democratic Sen. Edward M. Kennedy couldn't rescue the immigration bill.
Democrat Obama eight years later found himself unable to pull through on the strength of Republican leaders either. Members of his party painted his trade bill as another corporate giveaway like that of NAFTA during the Clinton administration.
The whole sense of "we've been through this before and it didn't work out" also pervaded the 2007 fight over immigration reform when Republicans argued against it based on the results of immigration amnesty granted during the Reagan administration.
Maybe the mold fits what is to come.
In 2008, we saw Republican candidate John McCain -- at one time a Bush primary rival -- do his best to distance himself from the Bush record without direct renunciation.
Next year, in 2016, we can expect the Democratic candidate (very possibly Hillary Clinton, a one-time Obama primary rival) do the same and hope for different results.
Anyway, the role reversal is clear.
By the time the dust cleared Friday in Washington, rookie Democratic Rep. Kathleen Rice of Garden City had cast a yes vote on fast-track authorization of a Pacific trade pact -- just as GOP Speaker John Boehner of Ohio did. And rookie Republican Rep. Lee Zeldin of Shirley cast a no vote -- just as House Minority Leader Nancy Pelosi (D-Calif.) did.
Leading up to this unusual bit of cross-partisan role reversal, both first-termers came in for local targeting by labor unions and others who ended up winning the day. Then they took their different paths.
Besides Rice, the only New York Democrat to vote yes was Rep. Greg Meeks (D-St. Albans). Among New York Republicans, Zeldin's no vote was one of five, including new Rep. Dan Donovan of Staten Island.