ASSOCIATED PRESS Bernie Sanders pulled off a win in Michigan's Democratic primary on Tuesday.

Sen. Bernie Sanders (I-Vt.) pulled off an upset victory in the Michigan primary Tuesday, picking up the majority of delegates in a state seen as a must-win for him to maintain a place in the Democratic race.

Former Secretary of State Hillary Clinton came into the Michigan primary with a strong lead in the polls, particularly among minority voters who make up a quarter of the electorate in the state. Clinton has dominated with non-white voters in this primary season, so a Sanders win in diverse Michigan stands out among his previous primary victories.

Michigan had been cast as Sanders' last, best hope for mounting a real challenge to Clinton's lead in the delegate count, and his campaign manager called the vote "a critical showdown." The state's primary is positioned between Super Tuesday and major primaries in Ohio and Florida on March 15, and it awards 130 delegates proportionally.

The two candidates faced off in a debate in Flint, Michigan, on Sunday, trading jabs on a wide range of issues. Sanders targeted Clinton's record on trade deals and job creation, linking her to NAFTA and the Obama administration's trade policies. Sanders hoped his populist stances on these issues would appeal to voters who have been ravaged by the recession.

But Clinton also claimed Sanders opposed the auto bailout, arguing that it saved 4 million jobs in the region. Sanders actually voted in favor of unsuccessful measures in Congress that would have bailed out automakers, but opposed the program that ultimately directed funds to Detroit because it also went toward bailing out Wall Street.

Both candidates have focused on the Flint water crisis in their appearances in the Michigan, blaming the state government for failing to protect the city from lead-contaminated water. They each called on the state's Republican Gov. Rick Snyder to resign over what Sanders described as a "dereliction of duty."

Clinton won Michigan in 2008, but due to a dispute over the state's primary date that year, the Democratic National Committee only awarded half of the state's delegates.

This article has been updated to include Sanders' votes on the automaker bailout.