Who did the USA buy the Virgin islands from

Denmark
In 1916 and 1917, Denmark and the U.S., respectively, ratified a treaty in which Denmark sold the Danish West Indies to the United States of America for $25 million in gold.

Read more...https://en.wikipedia.org/wiki/Virgin_Islands#History