Minnesota Sen. Amy Klobuchar sealed the first spot on the Illinois primary ballot, and Hawaii Rep. Tulsi Gabbard could wind up in the last slot in a lottery conducted Monday afternoon to set the ballot order for presidential hopefuls in the Democratic March primary.

The rest of the ballot includes former Massachusetts Gov. Deval Patrick in the second spot, followed by Vermont Sen. Bernie Sanders, former Vice President Joe Biden and former Mayor of New York Michael Bloomberg.

Massachusetts Sen. Elizabeth Warren, ex-Mayor of South Bend, Indiana, Pete Buttigieg, hedge fund manager Tom Steyer, and entrepreneur Andrew Yang took the sixth through ninth spots on the ballot.

Candidates — or a representative — had to be in line at 8 a.m. Jan. 2, the first day for presidential candidates to file in Illinois, to be put into the lottery.

Those whose campaigns weren’t in line on the first day will round out the bottom of the ballot.

That includes Colorado Sen. Michael Bennet in the 10th spot, followed by former Maryland Rep. John Delaney and Gabbard. The state’s board of elections is waiting for official confirmation from New Jersey Sen. Cory Booker about the suspension of his campaign to remove him from the last slot on the ballot.

Booker sent an email to supporters on Monday about dropping out of the race.

On the Republican side, three candidates filed in Illinois, but Wisconsin resident John Schiess — who won the GOP lottery Monday — filed only 10 of the required 3,000 signatures on his nominating petitions and will be removed by the Illinois State Board of Elections on Friday, Matt Dietrich, a spokesman for the board of elections, said in an email.

That means the Republican ballot order in Illinois will be President Donald Trump in the top spot, followed by Roque “Rocky” de la Fuente, a businessman who ran for president in 2016.

Last month, the Cook County Clerk’s Office had a lottery for races in the county.

Cook County State’s Attorney Kim Foxx won the top spot on the March ballot and former 2nd Ward Ald. Bob Fioretti the last position for that race.

Lotteries were held for 29 Democratic candidates in seven countywide races, with 21 vying for the top ballot position, and eight seeking to have their names appear last — conventional political wisdom holds that the first and final spots provide candidates a slight edge in crowded races.