Google parent company Alphabet reported a sharp drop in profits on Monday as the company absorbed the likely $5bn cost of a record-breaking fine from European regulators.

The European Union fined Google earlier this month after accusing it of “serious illegal behaviour” to secure its dominance in mobile search. The company is appealing the decision but included the charge in its latest quarterly earnings report.

Alphabet reported revenues of $26.24bn for the quarter, comfortably beating analysts’ expectations, and made a profit of $2.8bn, down from a profit of $4.1bn for the same period last year after the fine. Excluding the fine, the company would have had revenues of $32.6bn and a profit of $7.8bn.

In a statement, Ruth Porat, chief financial officer of Alphabet and Google, said the company had delivered “another quarter of very strong performance”. Alphabet’s share price rose over 6% in after hours trading as investors shrugged off the long-term impact of the EU fine.

Alphabet is facing regulatory headwinds on both sides of the Atlantic as lawmakers grow increasingly concerned about its dominance of online advertising. Google’s advertising business grew 24% over the quarter.

The EU fine followed an extensive investigation into the tech company’s policy of forcing smartphone manufacturers to pre-install Google’s search and browser apps on devices that use Android, its mobile operating system.

The decision was attacked by Donald Trump shortly after it was announced. “I told you so! The European Union just slapped a Five Billion Dollar fine on one of our great companies, Google. They truly have taken advantage of the US, but not for long!” Trump wrote on Twitter.

But it has done little to impact Alphabet’s share price. The company is now locked in a tight race with Apple, Amazon and Microsoft to become the first company ever to be valued at $1trn. And analysts have so far discounted regulatory risk to its rise. “The Android fine may suggest that peak regulatory risk is now in the rear view mirror,” Mark Mahaney of RBC Capital Markets wrote in a note before Monday’s results.