Diversified food maker Ralcorp Holdings Inc agreed to buy American Italian Pasta Co for about $1.2 billion in cash to further expand its product portfolio, and forecast a weak third-quarter profit.

The offer price of $53 a share is at a 27 percent premium to American Italian Pasta's Friday close.

Shares of Ralcorp were down 6 percent at $58.86 Monday morning on the New York Stock Exchange. Share of American Italian Pasta were trading up 26 percent at $52.56 on Nasdaq.

American Italian's branded products have achieved consistent margin expansion, which makes the business an attractive financial opportunity as a part of our portfolio of businesses, a company executive said on a conference call with analysts.

Ralcorp, which sells a variety of products including cereals, corn snack products, syrups and salad dressings, intends to fund the deal partly through cash and borrowings under its credit facilities and potentially debt or equity offerings.

The company expects the deal to close during its fourth fiscal quarter ending September 30.

Separately, Ralcorp said it bought privately held North American Baking Ltd and JT Bakeries Inc for an undisclosed amount to expand its portfolio of gourmet cracker offerings.

It expects the two deals to add to earnings during the remainder of the current fiscal year.

WEAK Q3 PROFIT VIEW

Ralcorp said its third-quarter earnings would be hurt partly by the impact of branded competition on its private-label cereal business at its Ralston Foods division.

Business at Post Foods -- a cereal maker it bought from Kraft Foods Inc in 2008 -- has also suffered due to increased promotional spending, Ralcorp said.

The company said it expects to earn $1 a share in the third quarter. Analysts' average estimate was $1.29 a share, according to Thomson Reuters I/B/E/S.

Ralcorp does not plan to give earnings outlook in future except under unique circumstances.

(Reporting by Mihir Dalal in Bangalore; Editing by Roshni Menon)