Karen Lewis, the fiery Chicago Teachers Union president who has been laying the groundwork for a challenge to Mayor Rahm Emanuel, underwent emergency surgery Wednesday and has a “serious illness,” according to the union.

Union officials confirmed Lewis’s health problems Thursday, after days of refusing to discuss what led Lewis to be admitted to Northwestern Memorial Hospital in Chicago on Sunday night.

Jesse Sharkey, the union vice president, said he could not identify the illness at the direction of Lewis’s family. “Her family has been very explicit about their desire to keep details of her health issues out of the public eye,” he said at a news conference at the union’s headquarters. He refused to answer a question from a reporter about whether Lewis has a brain tumor.

The health scare could end plans by Lewis to challenge Emanuel in the mayoral election, set for February.

Emanuel, 54, is completing his first term as mayor under sinking approval ratings, particularly among African American voters. A majority of black voters backed Emanuel four years ago, but support eroded after Emanuel closed 50 public schools — argely in African American neighborhoods — and has struggled to control violent crime, especially in minority communities.

At the same time, the mayor has directed school construction in the largely white and affluent North Side Chicago communities.

There’s also the matter of Emanuel’s personality, said Dick Simpson, a former Chicago alderman who teaches political science at the University of Illinois-Chicago.

“He’s a great CEO. He barks orders, people go out and do things, and some work out and some don’t,” Simpson said. “But there’s an arrogance. He’s not too good on democracy. He doesn’t ask people what they think.”

Lewis, 61, emerged as a political force in Chicago in 2012, when she defied Emanuel by leading 26,000 teachers and school workers through a successful seven-day strike — the first in Chicago in 25 years.

Teachers were furious with Emanuel, who had persuaded the Illinois General Assembly to raise the threshold for a strike, rescinded on a 4 percent pay raise and offered teachers extra money to waive their contract and work a longer school day.

The strike sidelined 350,000 students, but by and large, parents backed the union. Teachers won more pay, while Emanuel got the longer school day. And Lewis emerged as the woman willing to take on City Hall.

She became a national folk hero to union activists, traveling the country to urge teachers to push back against educational policy changes, such as school closings, the expansion of charter schools and, more recently, the Common Core K-12 standards in math and reading.

Lewis and Emanuel have had a tense relationship. She has called him “the murder mayor” and “a liar and a bully.” According to Lewis, at one meeting between the pair in 2011, the notoriously barbed-tongued Emanuel pointed his finger at her and screamed “[expletive] you, Lewis!”

A Chicago Tribune poll in August showed Lewis beating Emanuel in the mayor’s race, 43 percent to 39 percent, just outside the 3.5 percent margin of error.

Lewis formed an exploratory committee seeding it with $40,000 of her own money and another $30,000 from the American Federation of Teachers. The national union had pledged to give Lewis up to $1 million to challenge Emanuel.

Lewis has said she needed to raise $4 million to $7 million to wage a viable campaign against Emanuel, the former senior adviser to Bill Clinton, onetime congressman and former chief of staff to President Obama.

One of the most prolific Democratic fundraisers in the country and a former chair of the Democratic Congressional Campaign Committee, Emanuel has already amassed a war chest of about $8.5 million, according to campaign finance reports.

In recent weeks, Lewis had been criss-crossing the city, holding “Conversations with Karen” sessions in different neighborhoods to gauge support and hear from voters about their concerns.

As she worked to expand a campaign platform beyond education, Lewis consulted with Ras Baraka, the high school principal and city councilman in Newark who was elected mayor of that city this year after he promised voters he would fight school closings and economic stagnation and cut violent crime.

Democrat Bob Fioretti, a Chicago alderman, is the only declared candidate planning to run against Emanuel.