Thomas V. Mike Miller has been president of the Maryland Senate since 1987. Come January, he'll have to rebuild his leadership team essentially from scratch.

Three of Miller's top lieutenants went down in Democratic primaries on Tuesday. Thanks to other losses and retirements, most committees will have new chairs next year. Among those ousted were Nathaniel McFadden, the Senate president pro tem; Joan Carter Conway, who chairs the Education, Health and Environmental Committee; and Judiciary Committee Chair Joseph Vallario.

"Mike Miller's going to go to Annapolis in January faced with a decimated leadership team and a far more progressive Senate than he's faced before," says Todd Eberly, a political scientist at St. Mary's College of Maryland. "It may be a Senate that isn't comfortable with him as a leader."

Voters in Maryland were willing ousted veteran members they considered an impediment to progressive issues like criminal justice reform and a $15 minimum wage.

"The folks who are energized, the folks who are engaged, these are folks for whom progressive legislation is very important," says Christopher Honey, communications director for SEIU Local 500, a labor union that targeted Miller and his allies. "It's no surprise that this happened in a blue state like Maryland."

At the federal level, the biggest upset on Tuesday was in New York, where 28-year-old Alexandria Ocasio-Cortez, a Democratic Socialist who worked for the Bernie Sanders campaign in 2016 and was a bartender just last year, defeated 10-term Congressman Joseph Crowley.

This generally hasn't been a big year for ousting state legislators in primaries thus far. But an anti-incumbent wave also hit Oklahoma on Tuesday. There, the issue was problems with the state budget and a fight over school funding that led to a statewide teachers' walkout in April.

"This is entirely a mobilization against anti-tax, anti-education lawmakers in the GOP primary," says Keith Gaddie, a political scientist at the University of Oklahoma. "Of the 10 incumbent GOP House members who opposed education funding across the board and sought reelection, two lost outright and seven have runoffs, while the other one prevailed by just three votes."

Four other Republican incumbents in the Oklahoma House also lost their seats Tuesday, including one who lost to a middle school English teacher. According to the Oklahoma Education Association, there were 112 candidates who were teachers, school administrators, retired educators or individuals related to teachers. Of those, 70 won nomination or proceeded to runoffs on Aug. 28.

"Tuesday was evidence that the walkout did have a major impact on the election and that voters supported our schools and the education system," says Alicia Priest, the union's president.

Oklahoma Democrats recognize that they have no chance of erasing the Republican majorities in the legislature, but they hope that GOP incumbent losses in the primaries and any gains they make in the fall will shift the nature of working majorities next year.

"We could pick up enough seats to break the supermajority, and a lot of these Republicans are going to be replaced in their primaries by candidates who are less ideologically staunch," says Anna Langthorn, who chairs the Oklahoma Democratic Party.

In Maryland, it's Democrats who have a lock on both legislative chambers, frequently overriding GOP Gov. Larry Hogan's vetoes. But Republicans are seriously targeting five Democratic senators in hopes of having the numbers to sustain those vetoes. On Tuesday, Hogan helped take out GOP state Sen. Steve Waugh, who had sometimes voted with Democrats to override him.

John T. Willis, a former Maryland secretary of state, argues that the idea that Tuesday's vote was simply a matter of Democrats moving to the left is a bit simplistic.

"I don't think it's really ideological as much as it may be in other jurisdictions," he says.

Willis notes that some of the senators were defeated by sitting delegates whose voting records aren't terribly different.

"They were all recognized as substantive, hardworking members who had their own legislative records that they could present to voters, not just an ideological bent," says Willis, now a public affairs professor at the University of Baltimore.

Some of the challenges had been long in the making, not based on the fashion of the moment within the party to move left. Some of the defeated senators are in their 70s or even 80s. At least one, Finance Committee Chair Thomas "Mac" Middleton, represents a district where demographics had changed dramatically during his long years in office.

"This is not the first time that a younger delegate has beaten an older senator," says Willis.

Few can beat Miller himself for longevity. He was first elected in 1974 and has led the Maryland Senate for more than 30 years. They even named the Senate office building after him.

He faces new challenges, but he may be able to navigate them smoothly in the end.

"He's going to put together a leadership team again," says Matthew Crenson, a retired Johns Hopkins University political scientist. "You know you've been there a long time when you're not dead but they name a building after you."