Amgen Inc. said it is gearing up for a fight with the Internal Revenue Service over a bill for billions of dollars in back taxes.

Amgen said Tuesday that it received notices from the IRS that seek to increase its federal tax bill by $3.6 billion, plus interest, for the years 2010, 2011 and 2012. Amgen filed a petition in U.S. Tax Court to dispute the notices, the company said in its second-quarter earnings release.

“We firmly believe that the IRS’s positions in the notices are without merit and we will vigorously contest the notices through the judicial process,” Amgen said.

The IRS dispute concerns how the company allocates profits between Puerto Rico, where it has significant manufacturing operations, and the U.S. mainland, where its headquarters are located, said Amgen Chief Financial Officer Peter Griffith on a conference call with analysts on Tuesday. The IRS has become more aggressive in recent years in targeting so-called “transfer pricing,” which allows companies to assign profits to lower-tax jurisdictions.

“We have a difference of opinion on the value of the significant risk and the complexity we undertake with activities performed at our Puerto Rico facility,” Mr. Griffith said. The IRS dispute will take several years to resolve, he said.

The biopharmaceutical company said that any increase to its tax bill would be reduced by up to $900 million in repatriation taxes that previously accrued to its foreign earnings.

In the second quarter, Amgen reported a better-than-expected 5% revenue increase, but profit dropped, driven by a $1.51 billion write-off tied to its acquisition of Five Prime Therapeutics Inc.

Second-quarter profit dropped to $464 million from $1.80 billion a year earlier. On a per-share basis, profit was 81 cents, or $4.38 as adjusted. Analysts surveyed by FactSet expected a profit of $3.03 a share, or $4.09 a share as adjusted, on $6.46 billion in revenue.

Total revenue rose to $6.53 billion from $6.21 billion a year earlier.

Amgen, based in Thousand Oaks, Calif., said it had seen a gradual recovery from the first quarter in patient visits and lab test procedures, though still below pre-pandemic levels.

“The cumulative decrease in diagnoses over the course of the pandemic has suppressed the volume of new patients starting treatment, which we expect to continue to impact our business during the second half of the year,” the company said.

Write to Joseph Walker at joseph.walker@wsj.com and Maria Armental at maria.armental@wsj.com