A Swedish court has ordered the detention of the Russian captain of a ship which was suspected to be sailing under a false flag in the Baltic Sea and was boarded by authorities last week.