The British energy group BP sells its shares in the Russian oil company Rosneft.

BP had held a 19.75 percent stake in Rosneft since 2013.

The exit was also associated with the resignation of BP boss Bernard Looney and his predecessor Bob Dudley as members of the Rosneft board of directors, the group said in a statement on Sunday.

According to British media reports, BP gave in under pressure from the government in London.

"Like so many, I am deeply shocked and saddened by the situation in Ukraine and my heart goes out to all who have been affected," Looney said in a statement.

The events triggered a "fundamental realignment" in the relationship between BP and Rosneft.

The priority is taking care of the people in the region.

The decision made jointly by the BP board is also in the long-term interest of the group.

BP chief supervisor Helge Lund called Russia's attack on Ukraine an "act of aggression that will have tragic consequences across the region."

BP has worked in Russia with "brilliant Russian colleagues" for 30 years.

But the military deployment represents a fundamental change. The board of directors had therefore come to the decision that the participation in the state-owned Russian company could not be continued.