MOSCOW — The Russian government announced Wednesday that it will sell nearly 20 percent of its state oil company, Rosneft, to the Swiss commodity trading firm Glencore and the sovereign wealth fund of Qatar.

The deal defies expectations that no investor would dare buy a share in the Russian asset, given Western sanctions against the government of President Vladimir V. Putin.

But the emergence of foreign money suggests that investors are reassessing the sanctions after the election of Donald J. Trump, who has advocated warming ties with authorities in Moscow and is considering the chairman of Exxon Mobil, Rex W. Tillerson, as a candidate for secretary of state.

Mr. Tillerson criticized the sanctions as harmful for business after they halted an Exxon joint venture with Rosneft to drill for oil in the Kara Sea, in Russia’s sector of the Arctic Ocean.