A U.S. District Court judge here ordered the federal government yesterday to return more than $105 million in federal gasoline excise taxes to the Puerto Rican government.

The taxes have been collected by the United States over the last four years on gasoline refined on the Carribean island and then shipped to the United States. But Judge Oliver Gasch ruled that Puerto Rico was entitled to the money under the 1917 Jones Act, which says that taxes collected on goods produced on the island shall be sent to the Puerto Rican treasury.

Federal government attorneys said that the meaning of the Jones Act was not clear and that only such excise taxes as those collected on Puerto Rican rum and tobacco were intended to be sent to the Puerto Rican treasury.

But Gasch said that in view of a provision of the Jones Act which makes a "sweeping reference" to "all taxes" on Puerto Rican goods being sent to the Puerto Rican government, the federal government's argument "is at best a strained one."

Gasch also ordered the federal government to send back future excise taxes on Puerto Rican-refined gasoline. This will amount to $22 million in the year ending next July 31.

Joaquin Marquez, administrator of the Washington office of the Puerto Rican government, said the $105,661.920 windfall from the taxes over the last four years "is a hetty sum for us. But realistically speaking it will be two or three years before we get it. I'm sure the (federal) government will take an appeal."

Government officials declined to say whether they would appeal until they study Gasch's ruling.