EntreMed ( ENMD) surged in the premarket session Thursday after the biopharmaceutical company came up with enough money to alleviate a near-term liquidity crunch.

Rockville, Md.-based EntreMed licensed its thalidomide analog programs to Celgene ( CELG - Get Report) in a transaction worth about $27 million. It's the second licensing pact between the companies regarding thalidomide; the first, entered in 1998, resulted in a treatment for leprosy, although products stemming from the pact are often prescribed for cancer.

The pact calls for Celgene to buy EntreMed convertible preferred stock and warrants for $16.75 million. The preferred stock is convertible into 16,750,000 EntreMed common shares at $1 per share. The two companies also dismissed existing lawsuits against one another. EntreMed said the proceeds provide it with "sufficient cash in the bank to meet its near and intermediate term objectives."

The shares soared 51% to $1.30 on the Instinet premarket.