The results of the final electoral college polls in the United States on Monday confirmed that Republican candidate Donald Trump will be the 45th president of the country, AP reported. Trump won 304 electoral college votes, with chief rival and Democratic Party candidate Hillary Clinton winning 227. A candidate requires 270 votes to win the overall elections.

His win came despite a campaign by activists to dissuade electors from casting their ballots for him. While at least two Republicans did vote against Trump, divisions were also reported in the Democratic Party, with at least four electors voting for someone other than Clinton, according to Reuters. Breakaway electors from both parties cast their votes for other candidates including Libertarian Ron Paul and Clinton’s Democratic rival Bernie Sanders.

On Twitter, Trump said, “We did it!” He added, “Thank you to all of my great supporters, we just officially won the election (despite all of the distorted and inaccurate media).” In a statement later on, he said, “With this historic step we can look forward to the bright future ahead. I will work hard to unite our country and be the president of all Americans.”

The Electoral College was set up in 1787. It has 538 members. The number of electors for each state is decided by the number of representatives it has in the Congress plus one for each Senator. While most states award their electoral votes to the candidate who wins the popular vote, some states award them by congressional districts as well. In the November 8 elections, Trump won the electoral college vote despite losing the popular vote to Clinton.