Canadian National said on Tuesday it had offered to buy railroad operator Kansas City Southern for about $30 billion, trumping a rival bid by Canadian Pacific and sending the U.S. company's shares up more than 20%.

Either combination will create the largest North American railways, spanning across the United States, Mexico and Canada, by transaction value.

The offers come amid a recovery in supply chains that were disrupted by the COVID-19 pandemic, and follow the ratification of the US-Mexico-Canada Agreement last year that removed the threat of trade tensions which had escalated under former U.S. President Donald Trump.

Canadian National's offer of $325 per share, including $200 in cash and 1.059 shares, represents a premium of 26.8% to Kansas City Southern's last close on Monday.

Last month, Canadian Pacific had agreed to buy Kansas City Southern in a $25 billion cash-and-stock deal, valuing U.S. firm at $275 per share.

"We are surprised by this move given the healthy valuation Canadian Pacific had already offered to Kansas City Southern shareholders," Stephens analyst Justin Long wrote in a note.

"But we think Canadian National understood the competitive challenges this deal could present given the much broader geographic reach of the pro forma Canadian Pacific network."

Canadian National said its offer does not require the approval of shareholders, eliminating the condition in Canadian Pacific's offer, and thereby providing greater certainty for a close.

Canadian National said it will close the deal without waiting for regulatory approval through a voting trust structure and pay out Kansas City Southern shareholders. If the deal gets rejected by regulators, it will then sell off or publicly list Kansas City Southern.

Canadian Pacific had also offered a similar assurance to Kansas City Southern.

(Reporting by Shreyasee Raj; Editing by Shinjini Ganguli) ((Shreyasee.Raj@thomsonreuters.com;))