Leading long-term care pharmacy provider Omnicare, which announced this week that it has ended its efforts to takeover competitor PharMerica, posted a profit in the fourth quarter.

Faced with the Federal Trade Commission’s lawsuit blocking the takeover of PharMerica, Omnicare said Tuesday it was no longer “prudent to invest significant time and money in a lawsuit at this time.” The FTC voted Thursday to dismiss its lawsuit.

Omnicare first made a play for PharMerica in September, when it went public with a $457 million offer, which its biggest rival rebuffed.

Despite the loss, Omnicare stakeholders had good news yesterday, when the company announced it earned $31.2 million ending in December, compared to a loss of $65.3 million in the same quarter last year, the Associated Press reported. Revenue went up 2% to $1.56 billion from $1.53 billion. In 2012, the company said it expects to have an adjusted profit of $3.10 to $3.20 per share from continuing operations, and revenue between $6.1 billion and $6.2 billion.