Former President Barack Obama may live a stone’s throw away from Virginia now, but his sway over the state’s political landscape came up short on Tuesday.

Obama, who lives in the elite Washington, DC, enclave of Kalorama, has taken an interest in Virginia politics since leaving the White House. In 2017, the former president endorsed a slate of Democrat candidates running for Virginia’s top three statewide offices. The following year, Obama actively actively hit the campaign trail to see Sen. Tim Kaine (D-VA), a former chairman of the Democratic National Committee and failed vice presidential candidate, reelected.

This year was no different, especially with control of the Virginia General Assembly up for grabs.

Last weekend, as election day neared, Obama issued an endorsement of 17 legislative candidates, he claimed were ready to advance a slew of liberal priorities in Virginia. Most of the candidates were first time office seekers, with a few incumbents thrown into the mix.

“Proud to endorse an outstanding group of Virginia Democrats in Tuesday’s election—candidates who’ll not only advance the causes of equality, justice, and decency, but help ensure that the next decade of voting maps are drawn fairly,” the former president wrote on social media. “That’s good policy—and good for our politics.”

Proud to endorse an outstanding group of Virginia Democrats in Tuesday’s election—candidates who’ll not only advance the causes of equality, justice, and decency, but help ensure that the next decade of voting maps are drawn fairly. That’s good policy—and good for our politics. pic.twitter.com/IljmKBq7Gm — Barack Obama (@BarackObama) November 2, 2019

Despite the former president’s rousing endorsement, along with a hefty cash infusion from his allies across the country, a majority of the candidates failed to be elected on Tuesday. The losses by Obama’s preferred candidates came even as Democrats Virginia swept to power in both chambers of the Virginia legislature, setting themselves to control all three branches of state government for the first since 1993.

Such an accomplishment, while significant, cannot be attributed to Obama. Of the six Democrats the former president endorsed for the Virginia State Senate only two succeeded in garnering support at the ballot box, while three lost outright. One of the races is still too-close to call, but Republicans maintain a strong lead.

Obama endorsed the Democrat candidates in Virginia Senate races in the 7th, 8th, 10th, 11th, 12th, and 13th districts, and lost the 7th, 8th, and 11th districts. The 12th district has the Republican leading by two percent but has not yet been called, meaning Obama only won in the 10th and 13th districts.

That means the former president went two for six in state Senate races, a measly 33 percent win rate.

Obama had a slightly better, but far from perfect, track record in House of Delegates races. In the House of Delegates races, Obama endorsed the Democrat candidates in the 21st, 27th, 28th, 40th, 51st, 66th, 83rd, 84th, 85th, 94th, and 100th districts. Democrats won the 21st, 28th, 40th, 51st, 85th, and 94th districts, and lead a not-yet-called race in the 83rd. Republicans won the 66th and 100th, and currently lead not-yet-called races in the 27th and 84th. Assuming those final margins hold, that means of the 11 candidates Obama endorsed for the House of Delegates, Obama won 7 of them–and the GOP won 4–and went just over 60 percent there.

The losses by the Obama-endorsed candidates came even as many led their Republican opponents handily in campaign contributions. Missy Cotter Smasal, a small business owner from Virginia Beach, Va., raised $550,000 more than the incumbent Republican she was vying to unseat, according to the Virginia Public Access Project (VPAP). Some of those funds came from top Obama donors like Michael Bills, who along with his donated more than $130,000 to Smasal’s campaign, and groups allied with the former president, including Everytown for Gun Safety. The cash lead did not translate to votes tough, as Rodman lost to the incumbent by five percentage points.

There is also some evidence that victories by the two Obama-endorsed senate candidates result from factors beyond the former president’s control.

In Senate District 10, Ghazala Hashmi defeated incumbent Republican Sen. Glen Sturtevant by slightly more than 8,000 votes after an expensive campaign in which both candidates raised more than two million each. Sturtevant, who won the seat in 2015, was considered the Senate’s most vulnerable Republican because his district, which includes portion of the city of Richmond, is heavily Democratic. According to the VPAP, the 10th Senate District voted for former Secretary of State Hillary Clinton over President Donald Trump by a margin of 53 percent to 41 percent in 2016. The district has only grown to favor Democrats in the years since, voting for Gov. Ralph Northam (D-VA) by a 15 percentage points in 2017 and for Kaine by 24 percentage points in 2018.

A similar situation played out in Senate District 13 where Obama’s endorsed candidate, John Bell, won an open seat. Bell, who represented portions of the district in the Virginia House of Delegates, easily bested his Republican opponent, the Trump-endorsed Geary Higgins, by more than 7,000 votes. The results were not that surprising given Bell’s fundraising advantage—$2.1 million to Higgins’ $1.3 million—and the district’s Democrat lean. In 2016, Clinton carried it by a margin of six percentage points. Meanwhile, Northam carried it by 11 percentage points on his way to the governorship in 2017 and Kaine won it overwhelmingly by 18 points last year.

Although both victories helped ensure Democrat control of the state senate, losses by the four other Obama-endorsed candidates, like Smasal, means the party is likely to only have a one seat majority in the chamber.

The former president had more luck with the candidates he endorsed for the Virginia House of Delegates, albeit still failed to see them all elected. In total, six of the 11 Democrats that Obama backed won, while four lost. One race is still outstanding, but the Republican candidate is leading.

As with the senate races, there were a bevy of factors behind the results. Two of the candidates Obama threw his support behind, Delegates Hala Ayala and Kelly Convirs-Fowler, were incumbents running for reelection. Both women led the money race by heavy margins, with Ayala raising nearly a million dollars more than her Republican challenger, and were running in territory favorable to Democrats. In fact most of the districts Obama-endorsed candidates won and lost were carried by Clinton in 2016 and Kaine in 2018.

Some, like House District 28 in Northern Virginia, were carried by Democrats on Tuesday by small margins than in prior years. In 2016, Clinton won the district by four percentage points, before Kaine carried it by 12 points on his way to reelection last year. On Tuesday, though, the Obama-endorsed Joshua Cole only won the district by a slim margin of roughly four percentage points.

A comparable political environment existed in House District 100 on Virginia’s eastern shore, an area that has become increasingly friendly to Democrats in recent years. Even though Kaine won the district by 12 points in his 2018 reelection bid, the Obama-endorsed candidate, Phil Hernandez, failed to unseat the longtime Republican incumbent, Rob Bloxom. Hernandez’s three point loss was especially surprising given that he had out-raised Bloxom by more than $500,000.

The failure of Obama-backed candidates like Hernandez’s ensures that Democrats will have a slim majority in the Virginia House of Delegates next session. In a twist of irony, the Democrats narrow majority could end up slowing the very advancements in “equality, justice, and decency” the former president invoked when issuing his endorsements last week.