The flood danger from the Oroville Dam receded Monday, but California was hit by a wave of criticism for failing to heed warnings about risks to the spillway at a time when the state spent generously on illegal immigrants and high-speed rail.

California Gov. Jerry Brown, a Democrat, came under fire amid reports that federal and state officials for years rebuffed or ignored calls to fortify the massive 50-year-old dam, which provides water to more than 20 million farmers and residential consumers.

“What’s Governor Brown doing?” former state Assemblyman Tim Donnelly, a Republican, asked in a Monday post on Facebook. “The same thing he’s been doing for decades — obstructing progress.”

SEE ALSO: Trump approves Oroville Dam disaster declaration despite bad blood with California Democrats

A radio talk show host, Mr. Donnelly said California “has been so busy defying President Donald Trump in order to protect illegal aliens from deportation that it forgot to do the things government is supposed to do, like maintain infrastructure. Governor Brown is now going hat-in-hand to beg the Trump administration for emergency funds.”

The blame game for the giant sinkhole in the dam’s concrete spillway kicked in as state and county officials announced that they had managed to discharge enough water from Lake Oroville to stop sheets of water from cascading over its earthen walls.

Butte County Sheriff Kory Honea said at a Monday press conference that the goal is to reduce the water level by 50 feet to make room for the next round of storms, expected to hit Thursday and Friday.

Nearly 190,000 residents, as well as 500 inmates from the Butte County Jail, were evacuated from the area under an emergency order Sunday, but the sheriff said there was no word about when they would be allowed to return.

“This is still a dynamic situation,” said Sheriff Honea. “It’s still a situation we’re trying to assess the damage. We need to have time to make sure that before we allow people back into those areas, it is safe to do so.”

Bill Croyle, acting director of the California Department of Water Resources, said engineers increased the amount of water being discharged from the lake to 100,000 cubic feet per second to counter the inflow of 37,000 cubic feet per second.

“As indicated, we’re working to really dig down into the reservoir and move as much water out of that reservoir so we have space for the storms we expect to come in as well as the snow runoff later this spring,” Mr. Croyle said.

Mr. Brown issued an emergency order late Sunday to speed the state’s response to the flooding danger, brought on by three storm systems that dumped record rainfall on Northern California in late January. He has also requested a presidential major disaster declaration.

The Federal Emergency Management Agency is assisting state officials at the scene. Mr. Trump has not commented on the emergency, but Rep. Doug LaMalfa, California Republican, said he was working with the White House and House leadership on the declaration.

“They’re aware of what’s going on here, and they’re making their decisions now,” Mr. LaMalfa said at a press conference Monday.

Built in 1968, the Oroville Dam, located about 70 miles north of Sacramento on the Feather River, is the tallest dam in the nation at 770 feet, but environmental groups argue that the project’s infrastructure needs have been a low priority.

In 2005, advocacy groups led by Friends of the River urged the Federal Energy Regulatory Commission to order the state to reinforce the dam’s earthen walls with concrete, citing the erosion risk, the San Jose Mercury News reported.

The agency rejected the request on the recommendation of the state Department of Water Resources and local water agencies, which would have been on the hook for improvements that could have cost as much as $100 million.

Reinforcing the Oroville Dam was not included on Mr. Brown’s $100 billion wish list of projects prepared last month at the request of the National Governors Association in response to Mr. Trump’s call for $1 trillion in infrastructure improvements, CNBC reported.

One project that did make the list: California high-speed rail, a pet project of Mr. Brown’s with an estimated price tag of $100 billion that has become for state Republicans a symbol of out-of-control government spending.

Last month, the state’s 14 Republican members of the U.S. House sent a letter to Transportation Secretary Elaine L. Chao asking her to suspend federal funding for high-speed rail while her office conducts a “full and complete audit of the project and its finances.”

Critics of California’s willingness to spend billions of dollars on high-speed rail and services for illegal immigrants were quick to draw parallels to the state’s failure to invest in the Oroville Dam. The cost of fixing the spillway alone is now $200 million.

Charlie Kirk, founder of conservative student group Turning Point USA, fired off a meme Monday saying, “California Governor Jerry Brown spends $25 billion per year to support illegal immigrants/I wonder how much Governor Brown spent to maintain the Oroville Dam?”

Others defended Mr. Brown, pointing out that the emergency spillway had never been used until this year and that the catastrophic rainstorms came as a shock, especially after five years of drought.

Still others turned the crisis into an opportunity to blast Mr. Trump, saying he should repair the Oroville Dam instead of building a wall on the southern border.

Oroville isn’t the only dam facing problems. The American Society of Civil Engineers gave the nation’s dams a grade of D in a report last year, saying the average age of the nation’s 84,000 dams is 52 years.

The evacuations have resulted in mass closures of schools, government offices and businesses, although the Sacramento Bee reported that only a couple of looting incidents had been reported in Oroville. The Red Cross, Salvation Army and other nonprofits were assisting those displaced by the flood danger.

“It’s very much a fluid and dynamic operation that’s going on out there,” said Kevin Lawson, incident commander for Cal-Fire. “When you try to factor in what we’re dealing with with Mother Nature, it’s hard to look at a crystal ball and predict how that’s going to evolve.”