DES MOINES, Iowa (AP) _ Two days after urging shareholders not accept a hostile takeover bid from Nationwide Mutual Insurance Co., Allied Group Inc. on Thursday agreed to the merger, valued at more than $1.5 billion.

Allied accepted the deal after Nationwide on Wednesday increased its offer from $47 per share to $48.25 a share.

``We feel that, after looking at the proposal from Nationwide, it was really good for our shareholders, it was good for our policyholders, and it was good for our employees,'' Allied president and chief executive Douglas L. Andersen said.

``We felt it was a win-win situation for everyone involved,'' he said.

Nationwide, the nation's fourth-largest writer of auto insurance and fifth-largest home insurer, does most of its business in the eastern half of the United States. Des Moines-based Allied has a strong network of independent agents in Iowa, Nebraska, Colorado and California.

The combined companies will rank as the country's fourth-largest auto insurer and fourth-largest homeowners insurer.

The deal also includes Allied Mutual Insurance Co. and a $30-a-share offer for about 2.8 million shares of Allied Life Financial Corp. that are publicly held. That deal will provide Allied Mutual policyholders with a total dividend of $110 million.

``This new team will benefit from an expanded geographical reach that will feature a strong, diversified distribution network of Nationwide career agents and Allied's independent agents,'' said Dimon R. McFerson, Nationwide chairman and chief executive.

Nationwide had been trying to negotiate a merger with Allied since January but had been blocked by the Allied Group board of directors.

In May, Nationwide took its case directly to Allied shareholders with a $47 per share offering that was to end June 16. When the hostile bid was announced, Allied stock was trading around $28 on the New York Stock Exchange.

Allied shares rose rose 37 1/2 cents to close at $46.56 1/4 on the New York Stock Exchange Thursday.

McFerson pledged a ``long-term commitment'' to Des Moines and the cities where Allied has regional operations: Denver; Lincoln, Neb.; and Santa Rosa, Calif. He said that would include an additional 400 jobs in Des Moines over the next four years.

The deal is contingent upon shareholder approval, as well as regulatory approval in Iowa, Ohio, Arizona and any other states that may assert jurisdiction.