Russia annexed Crimea from the Ukranian government in 2014, and it claims the existence of a hard "maritime border" surrounding the peninsula.
NATO still recognizes Crimea and its territorial sea as part of Ukraine.
A "maritime border" is a concept unique to Russia: the UN Convention on the Law of the Sea does not give coastal states license to restrict international navigation within the 12-nm limit of their territorial seas (except for safety and law enforcement measures).
Foreign vessels are permitted to make innocent passage through other nations' territorial seas without prior notification, provided that they do not conduct military operations.
On Wednesday morning, AIS records appear to show that HMS Defender transited about 10 nm off the coast of Sevastopol, Crimea, the home of the Russian Navy's Black Sea Fleet.
The data indicates that she made several small course corrections in quick succession, then continued on a southeasterly course away from Crimea.
A recording posted to social media by a pro-Russia account appears to provide the VHF radio interactions between Russian forces and the bridge team aboard Defender.
Russian officials cited an existing coastal navigation warning and advised Defender to change course "for her safety."
After the transit, the Russian Ministry of Defense released a statement suggesting that Defender was chased off by warning shots and bombardment.
"The destroyer was warned in advance that weapons would be fired in case of a violation of the Russian state border. It disregarded the warning," the ministry told Interfax.
According to the statement, Defender crossed the 12-nm line at 1152 hours.
The ministry reported that a Russian border patrol ship fired warning shots in Defender's vicinity at 1206-1208, and at 1219, an Su-24M fighter dropped four OFAB-250 bombs "on the course" of the vessel.
"As a result of joint actions of the Black Sea Fleet and the Border Service of the Russian Federal Security Service, HMS Defender left the territorial sea of the Russian Federation at 12:23 p.m.," the ministry said.
The UK Ministry of Defence denied the Russian account of the transit. "No warning shots have been fired at HMS Defender.
The Royal Navy ship is conducting innocent passage through Ukrainian territorial waters in accordance with international law," the UK ministry said.
"We believe the Russians were undertaking a gunnery exercise in the Black Sea and provided the maritime community with prior-warning of their activity.
No shots were directed at HMS Defender and we do not recognise the claim that bombs were dropped in her path."
A BBC reporter was embedded aboard HMS Defender and recorded the events of the morning.
He reported that Russian border patrol ships approached the vessel to within about 100 yards and Russian jets flew by at close range, but no explosions or gunfire occurred in close proximity.