Two of Western New York’s congressional representatives hurtled toward re-election Tuesday night, while a third, Rep. Thomas W. Reed II of Corning, squeaked through a stiff challenge from a Democratic upstart.

California-born Democrat Nate Shinagawa of Tompkins County had 47.9 percent of the vote in the sprawling 23rd Congressional District, which covers 11 Southern Tier counties, including Allegany, Cattaraugus, Chautauqua and eight more counties to the east.

But Reed had 52.1 percent of the vote, or a 10,000 vote margin.

Like the old 27th District, which Reed represents, the 23rd still leans Republican, with about 158,000 Republican voters to some 130,000 Democrats, but 27 percent of the voters are not enrolled with a major party.

The district now takes in all of left-leaning Tompkins County, where Shinagawa, a hospital administrator, also serves as a county legislator. In Tompkins, the home of Cornell University and the City of Ithaca, Democrats outnumber Republicans by a 2-1 margin. Democrats also hold a slight but notable advantage in Chautauqua County, at the district’s western end.

Tompkins County polled strong for Shinagawa, giving him nearly 70 percent of the vote, or a 12,700-vote margin to buffer soft results elsewhere as he ran on the Democratic and Working Families Party lines.

Reed gathered votes on the Republican, Conservative and Independence lines, winning his home county of Steuben, and he built a small lead in Chautauqua County, as well.

Was the tight race expected? Though outspent, the Shinagawa campaign reported that a late-October internal poll showed their candidate within 5 percentage points of the GOP incumbent. The Reed camp disputed the poll, but Reed also had the ignoble distinction of being among those congressional representatives who took a dip in the Sea of Galilee in the summer of 2011, when he was part of a congressional delegation on a fact-finding mission to Israel. Though it’s not illegal to swim there, it broke from the decorum that the delegation wanted to project.

The race remained close throughout the early evening. Reed had planned a triumphant conference call with reporters at 10:45 p.m. but, to be safe, he delayed it to 11:30.

The 26th: Higgins vs. Madigan

Incumbent Democrat Brian K. Higgins coasted to victory for his fifth term in Congress as he defeated lesser-known challenger Michael H. Madigan. Madigan, a Grand Island Republican with tea party backing, also held the Conservative and Independence party lines. With 99 percent of the vote counted, Higgins had 74.6 percent of the vote.

The new 26th District has been confined primarily to Buffalo, its inner ring suburbs and the City of Niagara Falls. In sum, Democrats outumber Republicans by a 2-1 margin, making Higgins even more of the odds-on favorite.

Madigan, at a disadvantage in fundraising and media attention, resorted to a door-to-door campaign.

“I was really surprised by the support that I received from both Democrats and Independence Party voters,” he said in a prepared statement on the eve of Election Day. “I must admit that I assumed this area would be a challenge since it is Brian Higgins’ home turf, but the passion for change is as strong here as everywhere else.”

Door-to-door campaigning, however, is an exhausting and time-consuming way to turn things around in a district that has some 717,000 people and 428,000 voters.

The 25th: Slaughter vs. Brooks

Republicans spent millions of dollars in an effort to unseat Louise Slaughter, a Democrat from the Rochester suburb of Fairport. But she was easily relected to Congress for her 14th term.

Throughout the evening, she built a commanding lead over Republican challenger Maggie Brooks, the Monroe County executive. Slaughter’s old district had looked like a pair of earmuffs, an area stretching from Buffalo to Rochester and dipping into Fairport to include her official residence. The new district is confined to Monroe County, and even though it leans Democratic, Brooks was a formidable opponent, the first for Slaughter in 10 years.

Brooks has been elected countywide, in victories for county executive and county clerk. Her years as a television anchor in Rochester made her a household name. Her donors included the Republican Party’s biggest names in the House of Representatives: Speaker John Boehner of Ohio and Majority Leader Eric Cantor of Virginia.

Slaughter took 57 percent of the vote, or 166,342 votes to Brooks’s 124,585, according to unofficial results from the Associated Press.

Slaughter was first elected in 1986, and her stability has made her a steady force within the Democratic conference in the House. Because Republicans had made her a target, former President Bill Clinton appeared for her at a campaign rally, locking arms with both Slaughter and Rep. Kathleen C. Hochul, who faced a tough re-election bid. A Sienna Poll at the end of October showed Slaughter with a 10-point lead among likely voters.

In 2007, Slaughter became the first woman to serve as chairwoman of the influential House Committee on Rules, a position that allowed her to influence nearly every piece of legislation that comes to the House floor for a vote. She held that position from 2007 until 2011, when Republicans regained control of Congress. .

Slaughter also serves on the Democratic Steering and Policy Committee, and is chairwoman of two congressional caucuses: the Congressional Arts Caucus and the Bipartisan Congressional Pro-Choice Caucus, of which she was a founding member.