Updated

Independent candidate Bill Walker has won the Alaska governor's race, following an aggressive challenge to Republican Gov. Sean Parnell that included joining campaigns with a Democratic rival.

Walker grabbed a slim lead on election night, but the race was too close to call until thousands of absentee and questioned ballots were counted this week.

Walker, an attorney and former mayor of Valdez, is the first candidate unaffiliated with a party to be elected governor since statehood. Walker's mentor, Wally Hickel, served a term as governor with the Alaskan Independence Party, a recognized third-party in the state, before going back to the GOP.

Walker, who finished second to Parnell in the 2010 GOP gubernatorial primary, bypassed this year's primary by gathering signatures to support an outside run. But Walker didn't change his party affiliation from Republican to undeclared until forming a "unity ticket" with Democrat Byron Mallott as a candidate for lieutenant governor on the November ballot.

Mallott won the Democratic nomination for governor in August, but a Walker-Mallott ticket was seen as more competitive to Parnell, who ran with Anchorage Mayor Dan Sullivan, a fellow Republican. Walker and Mallott joined forces in early September at the urging of labor interests and others.

A major issue for Walker has been a natural gas pipeline project. Walker advocated for one for years but has taken issue with the process for pursuing one set up by Parnell's administration and approved by the Legislature, which involves the North Slope's three major oil producers and TransCanada Corp., which would own at least part of the state's interest in the pipeline and gas treatment plant. Walker vowed not to start over and to see a project through but also said Alaska needs a greater say than it currently has.

Parnell accused Walker of having no specific plans and contradictory views, such as saying Medicaid and education would be looked at, with other areas, for possible spending cuts, while also supporting Medicaid expansion.

Parnell faced sharp criticism in the lead-up to the election over his administration's handling of allegations of sexual assault and other misconduct within the Alaska National Guard. Parnell said he and his staff followed up on every allegation they received.