It seems unthinkable, even now, that the disastrous oil spill in the Gulf of Mexico could bring down the mighty BP. But investment bankers get paid to think the unthinkable — and that is just what they are doing.

The idea that BP might one day file for bankruptcy, particularly as part of a merger that would enable it to cordon off its liabilities from the spill, is starting to percolate on Wall Street. Bankers and lawyers are already sizing up potential deals (and counting their potential fees).

Given the plunge in BP’s share price — the company has lost more than a third of its value since Deepwater Horizon blew — some bankers and analysts say BP is starting to look like takeover bait. The question is, who would buy BP, given its enormous potential liabilities?

Shell and Exxon Mobil are both said to be licking their chops. And already, flinty legal minds are dreaming up scenarios in which BP would file a prepackaged bankruptcy and separate the costs of the cleanup — and potentially billions of dollars in legal claims — into a separate corporate entity.