US President-elect Donald Trump at a rally at the Wisconsin State Fair Exposition Center in West Allis, Wisconsin, on December 13. REUTERS/Shannon Stapleton

Donald Trump was officially elected the 45th US president when the Electoral College met Monday, despite having lost the popular vote to his Democratic challenger, Hillary Clinton, by more than 2.9 million votes.

There's actually a way in which the US can keep the Electoral College as the Constitution intended while still awarding the presidency to the winner of the popular vote, The New York Times' editorial board argued Monday.

It's called the National Popular Vote interstate compact.

Here's how it works. Currently, the presidency is decided by 538 electors, who are allotted to states proportionate to the state's population. Texas with its huge population, has 38 electors, while Wyoming has three.

Much of the US's population is concentrated in Democratic strongholds — on the coasts and in large cities like Chicago and New York City. The Electoral College, the logic goes, forces presidential candidates to focus their attention on states that could otherwise be overlooked, like New Hampshire and Wisconsin, and theoretically gives small states an important say in who runs the government.

The first candidate who wins 270 electoral votes wins the presidency, even if the candidate loses the popular vote. It's a winner-take-all system.

The Times points out, however, that while the Constitution establishes the existence of the electors, it does not mandate how they should vote.

Pennsylvania elector Carolyn Bunny Welsh with her ballot for Trump before casting it at the Pennsylvania State Capitol in Harrisburg on Monday. REUTERS/Jonathan Ernst

Eleven states and Washington, DC, have passed legislation to have their electors cast their vote for the winner of the national popular vote. This agreement — the National Popular Vote interstate compact — will take effect only when states representing a majority of Electoral College votes, 270, sign on.

As of 2016, the compact represents 165 electoral votes — it's 61% of the way there. When Obama won the Electoral College by a huge margin in 2012, Trump himself called the system a "disaster for democracy."

The Times called the National Popular Vote compact an "elegant solution" to the popular-vote conundrum. It keeps the Electoral College in place, faithful to the Constitution, while awarding the presidency to the popular-vote winner.

"A direct popular vote would treat all Americans equally, no matter where they live — including, by the way, Republicans in San Francisco and Democrats in Corpus Christi, whose votes are currently worthless," The Times wrote.

"It's hard to understand why the loser of the popular vote should wind up running the country."