Kay Hagan, a moderate Democrat from North Carolina who pursued a successful banking career before becoming a stay-at-home parent, then served one term in the U.S. Senate after securing a 2008 victory over incumbent Elizabeth Dole, a Republican considered Washington royalty, died Oct. 28 at her home in Greensboro, N.C. She was 66.

A family representative, Ross Harris, said the cause was complications of Powassan virus, which can cause encephalitis. Ms. Hagan had been diagnosed with the tick-borne virus in 2016. The day before her death, she visited with former vice president Joe Biden, who is seeking the Democratic nomination for president.

In a statement, Biden called Ms. Hagan “a champion for North Carolina and a fierce defender of all its citizens,” adding that “she was a crucial partner” in passing the Affordable Care Act and the 2009 economic stimulus package.

Ms. Hagan, a former vice president at what is now Bank of America, lost her Senate seat in 2014 to Thom Tillis, the Republican speaker of the North Carolina House. She had previously spent a decade as a state senator in Raleigh and decided to run for Congress after several ­high-profile Democrats backed away from the 2008 race.

Her opponent, Dole, had served as a Cabinet secretary in the Reagan and George H.W. Bush administrations and was the wife of Bob Dole, the former Senate majority leader and Republican candidate for president.

Ms. Hagan, by contrast, was a little-known state lawmaker, albeit with deep ties to North Carolina and politics in her blood. Her father was a former Florida mayor, and her uncle was Lawton Chiles, a Democratic senator from Florida who was elected governor in 1990. In her 20s, she interned for him on Capitol Hill, operating a bronze elevator for senators while imagining her own political future.

Buoyed by the energy surrounding Barack Obama’s presidential candidacy in 2008, she won her Senate seat by more than eight percentage points, becoming the first female Democratic senator from North Carolina and the state’s second female senator ever, following Dole.

“It was a shock, particularly the margin of victory,” said Andrew J. Taylor, a political science professor at North Carolina State University. “Not only did she beat Dole, but she ran ahead of Obama and she ran ahead of Bev Perdue,” a Democrat who was elected the state’s first female governor. Two women winning high statewide offices in North Carolina was “historic,” he added, “especially in a Southern state with its social conservatism.”

Ms. Hagan maintained a centrist approach in the Senate, with an eye toward the tobacco and banking interests that had long dominated her state’s economy. After voting for the 2010 financial regulation overhaul known as Dodd-Frank, she pushed to delay a ban on proprietary trading by banks and to delay restrictions on fees charged for transactions.

She also worked to limit payday lending and was the only Democrat to vote against 2009 legislation that empowered the Food and Drug Administration to regulate the tobacco industry, joining Sen. Richard Burr (R-N.C.) to propose an alternative in which a separate federal agency would be created to oversee the industry.

Ms. Hagan backed abortion rights and proposals to expand background checks for gun buyers, and she supported expanded roles for women in combat. Sitting on the Armed Services Committee, she also questioned Army Secretary John McHugh on the deaths of 12 infants at Fort Bragg and pressed for the release of documents on contaminated water at Camp Lejeune in North Carolina.

“In our time as Senate colleagues, we worked across the aisle together frequently on issues that we both knew would determine what type of country our children would inherit, from conservation to our common defense,” Burr said in a statement Monday. “She tackled everything she did with a passion and a sense of humor that will be missed.”

Janet Kay Ruthven was born in Shelby, N.C., on May 26, 1953. Her mother was a homemaker, and her father served in the Navy during World War II before moving the family to Lakeland, Fla., to open a tire business. He later worked as a real estate broker and was elected mayor.

In 1975, Ms. Hagan received a bachelor’s degree in American studies from Florida State University. She graduated from law school at Wake Forest University in 1978, one year after marrying a fellow student, Charles “Chip” Hagan III.

They soon moved to his hometown of Greensboro, where Ms. Hagan worked for a decade in the trust division of North Carolina National Bank before leaving to focus on her three children. She later worked on political campaigns for Gov. James B. Hunt Jr., who encouraged her successful run for the North Carolina Senate in 1998.

Ms. Hagan juggled committee meetings with Girl Scout events and won four more terms before announcing her 2008 Senate bid. In a contentious general-election campaign, she was dubbed “fibber Kay” by Dole, who ran a television ad suggesting Ms. Hagan was “godless” — a charge that led Ms. Hagan, a Sunday school teacher and Presbyterian church elder, to file a defamation suit that was withdrawn after the election.

She later lost her reelection to Tillis by fewer than 50,000 votes, in what was widely described as a referendum on Obama. In recent years, she was a fellow at the Harvard Institute of Politics and a senior policy consultant at Akin Gump, one of Washington’s largest law and lobbying firms.

In addition to her husband, survivors include three children, Jeanette Hagan, Tilden Hagan and Carrie Hagan Stewart; her father, Joe P. Ruthven; two brothers; and five grandchildren.

Ms. Hagan was often described as a Pilates-loving fitness buff, and she arrived on Capitol Hill in 2009 expecting to exercise and relax by way of the Senate swimming pool. On the door, however, was a sign reading, “Men Only,” a restriction that was apparently instituted because some male senators liked to swim naked, according to reports in Politico and the New York Times.

With help from Sen. Charles E. Schumer (D-N.Y.), Ms. Hagan led a successful battle to end the practice. A new sign was placed on the pool door, “Proper Attire Required.” And when Ms. Hagan lost her Senate race in 2014, her female colleagues threw her a goodbye party — where else? — at the pool.