Rempex Pharmaceuticals Inc. has been acquired for up to $474 million — including $140 million upfront — by The Medicines Co.

San Diego-based Rempex, a privately held company that develops antibiotics to treat drug-resistant bacteria, already has one drug on the market, two in clinical trials and several others in early study.

Carbavance, a Rempex antibiotic that’s in clinical trials, was one of the key assets that led to the acquisition, The Medicines Co. CEO Clive Meanwell said.

The Medicines Co. (Nasdaq: MDCO), a publicly traded pharmaceutical company based in Parsippany, N.J., has agreed to pay Rempex equity holders up to $214 million in development and regulatory milestone payments, as well as $120 million in commercial milestone payments.

The Medicines Co. is a $2.2 billion market cap company, which had $558.6 million in revenue and net income of $51.3 million in the year ending Dec. 31, 2012.