With 62 out of 84 possible votes, lawmakers voted in favour of the move to create a law to adopt Bitcoin, despite concern about the potential impact on El Salvador's program with the International Monetary Fund.
The president has touted the use of Bitcoin for its potential to help Salvadorans living abroad to send remittances back home, while saying the USD will also continue as legal tender. In practice, El Salvador does not have its own currency.
In an idea he appeared to have developed overnight, the president later said he had instructed state-owned geothermal electric firm LaGeo to develop a plan to offer Bitcoin mining facilities using renewable energy from the country's volcanoes, as Reuters report.
Under the new law, Bitcoin must be accepted by firms when offered as payment for goods and services. Tax contributions can also be paid in the cryptocurrency.
Every day we send out a free e-mail with the most important headlines of the last 24 hours.
Subscribe now