Having already lost the presidential contest, Federalist Party representatives in the lame duck House session seized upon the opportunity to embarrass their opposition and attempted to elect Burr over Jefferson. The House deadlocked for 35 ballots as neither candidate received the necessary majority vote of the state delegations in the House (the votes of nine states were needed for an election). Jefferson achieved electoral victory on the 36th ballot, but only after Federalist Party leader Alexander Hamilton—who disfavored Burr’s personal character more than Jefferson’s policies—had made known his preference for Jefferson.
https://en.m.wikipedia.org/wiki/Electoral_College_(United_States)