Private equity firm GTCR said Thursday that it plans to acquire bank services company Fundtech Ltd. for $352.7 million in cash, beating out an offer from S1 Corp.

Shares of Fundtech soared on the news.

GTCR, based in Chicago, offered $23.33 per share in cash for Fundtech. Fundtech's board decided the offer was better than the all-stock offer that payments software provider S1 made in June.

Under that deal, each Fundtech stockholder would have received 2.72 shares of S1's stock for each Fundtech share. That deal was valued at roughly $320 million at the time of the announcement in June, or $373.4 million based on S1's most recent closing price.

Fundtech said it will end its agreement with S1. However, S1 has five days to make a better offer.

S1, based in Norcross, Ga., said it is currently reviewing its options. S1 is also facing an unsolicited takeover bid for its company from a competitor, which its board does not support.

If the GTCR deal is completed, the company intends to combine Fundtech with its existing payment services company, BankServ. The combined company would be based at Fundtech's U.S. headquarters in Jersey City, N.J. and maintain much of the same management. Fundtech is based in Israel.

"Fundtech is a premier financial technology franchise, and combining these two complementary companies would create an industry leader in the growing market for innovative banking technologies and electronic corporate payments," Collin Roche, GTCR principal, said in a statement.

Shares of Fundtech rose $5.29, more than 30 percent, to $22.86 in morning trading on the news. S1 shares rose 10 cents to $9.18.