Real estate specialty finance company Gramercy Capital Corp agreed to buy American Financial Realty Trust for $3.4 billion in cash and stock, including debt, the companies said.

Gramercy will buy all of American Financial's common stock for $5.50 per share in cash and 0.12096 shares of Gramercy common stock.

American Financial's shareholders are expected to own about 31 percent of Gramercy's outstanding shares and Gramercy expects to own about 27 million square feet of commercial real estate in 37 states to add to its $3.5 billion of debt investments.

(Reporting by Neetha Mahadevan in Bangalore)