NEW YORK (AP) — State Sen. Jose Peralta, a New York lawmaker who was the first Dominican-American elected to the Senate, has died. The Democrat was 47 and nearing the end of nearly two decades in office after losing a primary this fall.

Peralta died Wednesday night at Elmhurst Hospital, spokesman Chris Sosa said. The cause of death has not been determined.

Peralta's wife, Evelyn, told reporters he had felt pressure behind his ears and headaches for a week or more and had seen a doctor, according to local news outlets. But his condition didn't raise alarms until he developed a fever Tuesday and became disoriented and had trouble breathing Wednesday, when he was taken to a hospital, she said.

His wife said the family believes his illness was an infection but is awaiting autopsy results.

"We really don't know what happened," she said. "... He just took a turn for the worst."

Peralta represented parts of Queens in New York's Senate for eight years and served in the state Assembly for eight years before that. As a senator, he was a member of a breakaway Democratic group that, for a time, formed a coalition with Republicans to control the chamber.

News of his death brought an outpouring of sympathy from officials and the soon-to-be-senator who ousted him in September's primary.

"When I met him in 2003, I saw a world of promise for our community," Sen.-elect Jessica Ramos wrote on Twitter. "Though years later we'd disagree on tackling the issues, I know in his heart he loved his community. He was a true public servant."

Gov. Andrew Cuomo, a Democrat, called Peralta "a relentless advocate for Queens" who "fought tirelessly to make a difference for others."

State Assembly Speaker and fellow Democrat Carl Heastie recalled Peralta's commitment to public schools, gun safety and immigrant rights.

"His constituents remained his top priority" even after his primary loss, Heastie said in a statement, noting that Peralta was coordinating a flu shot clinic in his district and distributing Thanksgiving turkeys to the needy only days ago.

Peralta started his state political career in 2002, when he was elected to the Assembly. He won a special election in 2010 to the state Senate and was re-elected in four general elections.

He later became a member of the now-defunct Independent Democratic Conference, the splinter group that helped maintain Republican control of the chamber. Cuomo brokered a deal earlier this year to reunify Senate Democrats, but six of the IDC's eight former members were soon ousted in party primaries.

Peralta's survivors include his wife and two sons.

More From WIBX 950