Ferrari waded into the middle of an international political dispute by displaying the flag of the Italian navy on its cars during Formula One practice at the Indian Grand Prix on Friday.

The display was to show solidarity with two Italian sailors who are held in the country after the shooting deaths of Indian fisherman in February. They claimed they mistook the fishermen for pirates. The navy was protecting an Italian cargo ship in the Indian Ocean.

The pair — Massimiliano Latorre and Salvatore Girone — have been granted bail but must remain in India. Italy insists they should be able to return home because it took place in international waters.

The Indian government expressed its unhappiness at Ferrari's move and said that the law of the land would take its course.

"As regards use of sporting events for causes which have nothing to do with sports, it certainly (is) not in the spirit of sports as we deem it," India's external affairs ministry said in a statement Friday.

Ferrari's display flirted with the sport's rules, which prohibit racial, political or religious gestures.

Team principal Stefano Domenicali refused to be drawn into the controversy during questioning Friday, ultimately saying it was "not true" that the team was overtly supporting the sailors.

A Ferrari spokesman was quoted by the Indian Express newspaper as saying "we have utmost respect for the Indian authorities. We just hope that a solution can be found as soon as possible."

F1 boss Bernie Ecclestone said the sport was apolitical and that the organizers did not have anything to do with it.

"We'll ask the national sports organizations to have a look at that," Ecclestone said.

Whether Ferrari believed the display was an overt political gesture or not, it was strongly supported by the Italian government. Italian foreign minister Guilio Terzi tweeted: "Congratulations to Ferrari for displaying the navy's symbol at the India GP. It will show the sailors the whole country is behind them."

Ferrari company chairman Luca di Montezemolo said the flag was mostly a tribute to the navy and trying to mend the situation regarding the two sailors.

"We just want to give a small contribution, with great respect to the Indian authorities, toward finding a solution with dialogue," di Montezemolo said. "The navy is one of Italy's best symbols. I have great memories of when I was a young student at the Morosini naval academy."

Indian and Italian government officials held meetings in February about the case but no agreement could be reached. The naval guards spent four months in confinement as Indian police opened murder charges against them. They were given bail in June but have to make regular court appearances.