LONDON—The U.K. government told BP PLC that it would oppose any potential foreign takeover of the company because it wants the oil giant to remain a British company with global clout.

With a market cap of more than $132 billion, BP would be a huge takeover target—and a big bite for even its largest rivals. But amid today’s low oil prices, speculation has swirled over possible deal making. Earlier this month, Royal Dutch Shell PLC reached a deal to buy UK-based BG Group PLC for some $70 billion.