WASHINGTON (AP) _ The price of imported goods, one of the main inflationary yardsticks in the U.S. economy, rose 2.7 percent in the April-June quarter, the largest increase in more than a year, the government reported Thursday.

The Labor Department said the second quarter rise followed a 1.2 percent increase in the January-March period and was the steepest since the 4.1 percent jump in the first three months of 1987, which was attributed almost entirely to rising crude oil prices.

Higher oil prices were also a significant contributor to the second quarter gain this year. Imported fuel and related products jumped 6.7 percent from the first quarter. However, over the past year, they were down 12.7 percent.

Excluding the effects of the jump in imported oil, second quarter prices rose 2.3 percent, in line with the average quarterly increase over the last three years.

Sharp rises in metals and natural rubber led the climb. Iron and steel prices soared 35 percent in the second quarter, while other metals rose 16.5 percent. The price of imported nickel, a key ingredient in steel manufacturing, shot up 55.8 percent for the quarter and more than doubled in price over the past year.

The price of natural rubber climbed 32.8 percent for the quarter and was up 60 percent from a year ago. Bill Alterman, a Labor Department analyst, said the worldwide acquired immune deficiency syndrome epidemic is driving up natural rubber prices by increasing the demand for condoms and rubber gloves.

For the past year, import prices were up 6.3 percent. That compares with a 4.4 percent annual rate of inflation in overall consumer prices since the beginning of 1987.

The fall of the dollar from highs in early 1985, while improving the price competitiveness of U.S. goods overseas and helping to lower the U.S. trade deficit, also has the effect of boosting the price of foreign goods in American markets.

However, according to the report, the dollar played a substantially smaller role in driving up import prices than in previous quarters. The dollar declined in value against foreign currencies by only 0.2 percent in the second quarter, compared with drops of 1.1 percent in the first quarter and 5.8 percent in last three months of 1987.

In recent weeks, the value of the dollar has been rising.

On the export side, prices of U.S. goods sold overseas also rose 2.7 percent, the largest increase since the government began tracking the figures in September 1983.

Rising metal costs, as well as the first drought-caused jumps in grain prices, were responsible for much of the export rise in the second quarter.

The price of exported grain was up 9.3 percent in the April-June period, led by a 30.1 percent hike in wheat prices. Iron and steel prices rose 4.4 percent while other metals were up 7.2 percent.