LONDON, March 2 (Reuters) - Russia can still send oil and gas to Britain despite a ban on the country's ships visiting British ports, the Department for Transport (DfT) said on Wednesday.

Britain on Tuesday passed a law that it said banned all ships that have any connection to Russia from entering its ports following the Russian invasion of Ukraine.

The law applied to all ships that are Russian owned, operated, controlled, chartered, registered or flagged.

However, the transport department said the sanctions were focused on the vessel, not its cargo, and so would not stop ships registered with other countries from transporting Russian oil or liquefied natural gas to Britain.

Russia, which has described its actions in Ukraine as a "special operation", has already responded in kind to other sanctions such as a UK and EU decision to block Russian planes from using their airspace.

Russian vessels carrying cargoes of energy make regular visits to UK ports.