DENVER (AP) — Colorado's Senate has passed a bill to have the state award its presidential electoral votes to the winner of the national popular vote.

Democratic Sen. Mike Foote's bill would have Colorado join 11 states and the District of Columbia in what's called the National Popular Vote Interstate Compact.

It would replace the Electoral College, in which 270 electoral votes are needed to win the U.S. presidency. Compact proponents say it would go into effect once enough states with 270 votes enter the pact.

Colorado has nine electoral votes. Compact members currently have 172 electors.

The bill, which passed on party lines Tuesday, goes to the Democrat-controlled House.

Several presidents, most recently Donald Trump in 2016, were elected with an electoral college majority despite losing the popular vote.