House Speaker Michael J. Madigan steadily hung on to his longtime post Tuesday night as his chief rival Jason Gonzales’ efforts to unseat the state’s most powerful Democrat petered out.

Despite the barbs thrown by Gov. Bruce Rauner and the growing criticism against Madigan, 42-year-old Gonzales didn’t make much of a dent into Madigan’s reign in the predominantly Latino 22nd District.

Gonzales, a Democrat who secured the backing of many Republicans and Rauner supporters, and raised more than $100,000 for his campaign, drew percent 27.6 percent of the votes with 97 percent of the precincts reporting Tuesday night.

Madigan had a 64.7 percent of the votes.

Madigan’s last serious challenger got less than a fourth vote in 2012.

“Obviously there’s a lot of disappointment,” Gonzales’ campaign manager, Ben Gould, said after Gonzales conceded at gathering Tuesday night at the Chicago Marriott Midway.

“We knocked on 70,000 doors and made 60,000 calls. We were up against the toughest candidate out there. We feel good about the campaign but we’re obviously disappointed by the results.”

Gould said he hopes the “fresh new ideas” Gonzales proposed will be taken into consideration by elected officials and eventually help those constituents who have felt neglected.

A Madigan spokesman did not return a message for comment.

Two others — Grasiela Rodriguez and Joe Barbosa — were also listed on the ballot for the 22nd District race.

Rodriguez had 5.8 percent of the votes, and Barbosa had 1.9 percent with 97 percent of the precincts reporting.

Gonzales has maintained that he and Madigan were the only candidates on the ballot until he submitted his paperwork just minutes ahead of the filing deadline, prompting a Madigan operative to quickly pull out petitions in Rodriguez’ and Barbosa’s names.

Rauner, since taking office, has blamed Madigan for the state’s huge deficit and budget stalemate, emboldening many voters in the neighborhood to express their dissatisfaction for the house speaker.

“People tell me ‘Mike Madigan hasn’t knocked on my door in 25 years,’” Gonzales told the Sun-Times last month.

The rising complaints and feud between Madigan and Rauner gave a boost to Gonzales who has been applauded for taking on the rarely challenged Madigan. But many also wondered whether Gonzales even stood a chance since Madigan has hold of most campaign funds for Democratic candidates and has since racked up a crucial endorsement from popular Cook County Board Member Jesus “Chuy” Garcia.

Gonzales, a high school dropout who went on to receive degrees from Duke, MIT and Harvard, grew up in Carpentersville but just moved into the 22nd District less than two years ago.

The business consultant was pardoned in 2015 by then Gov. Pat Quinn for his 1991 conviction in Lake County for unlawful use of a credit card at age 17.

Madigan, whose name is synonymous with Chicago’s Machine politics, has been a state representative since 1971 and battered Gonzales with brutal television commercials.