In a bid to capture more business  from customers who shop online, giant  Allstate Corp. has agreed to pay $1 billion to buy two popular online insurance sellers — Esurance and the associated site, Answer Financial.

Allstate will pay a total price of about $1 billion– $700 million plus the tangible book value of the two firms acquired at close.

Esurance is the third-largest provider of online auto insurance quotes through its website and a 24/7 call center. It sells in 30 states. Over the past five years, Esurance has more than doubled policies in force and grown premiums on average 20 percent per year, according to the company, which advertises heavily. It also sells other personal lines coverages.

Answer Financial provides auto insurance quote comparisons from 20 brand-name auto insurance companies to buyers in all 50 states. The carriers it represents include Esurance, Travelers, Progressive, Safeco, Met Life Auto & Home, Unitrin  and The Hartford. In July, it reported having 324,000 policies in force.

Alltstate is buying the firms from White Mountains Insurance Group, Ltd., a Bermuda-domiciled financial services holding company with interests in property/ casualty insurance and reinsurance, including OneBeacon.

Allstate, which has seen its personal lines business shrink,  said the deal lets it expand its service to consumers who prefer to buy direct online rather than through personal agents. It allows it to compete with Progressive and Geico, which have strong web insurance shopping sites.

“Consumers today expect to have their specific needs met by their insurance companies. Our strategy is to focus on individual preferences and utilize different value propositions for distinct consumer segments,” said Thomas J. Wilson, Allstate’s president, chairman and chief executive officer.

He said Allstate agencies do “an outstanding job of serving customers who want a local personal touch and prefer to purchase a branded product.” But Esurance will expand the company’s ability to serve customers who are “more self-directed but still prefer a branded product.”

He said Answer Financial will strengthen Allstate’s offering to individuals who want to be offered a choice between insurance carriers and are brand-neutral.

The move has Allstate agents concerned.

“Many Allstate agents are viewing the proposed acquisition suspiciously. The company has been hell-bent on growing its direct channel for years, but only recently has it had any success,” said Jim Fish, executive director of the National Association of Professional Allstate Agents, Inc. “Who knows, the success of the Esurance business model and technology platform could ultimately improve and transform Allstate’s direct channel into a powerhouse. Should this come to pass, Allstate agents would feel more expendable than ever.”

According to Fish,  Allstate is shedding seasoned agencies in favor of larger agencies with more staff.  “[S]o adding this acquisition to the agents’ woes, can only create more angst. Without a doubt, the agents want Allstate to be successful – but not at their expense,” he said.

Allstate said Esurance and Answer Financial will retain their brand names. Esurance has some 1,7000 employees and 14 regional offices.

Wilson said Allstate would now be the only company serving all of these consumer segments with unique insurance offerings.

“This transaction is also attractive for our shareholders. Association with Allstate will improve Esurance’s marketing effectiveness and it can leverage our world-class pricing and claim capabilities. This also offers us two additional sources of growth and an immediate increase in customer relationships,” Wilson said.

Premiums for policies sold by both Esurance and Answer Financial were $ $1.2 billion in 2010. Gross premiums written by Esurance were $839 million for the year. Esurance had 839,000 policies-in-force, including 328,000 policyholders at Answer Financial. The Esurance segment added approximately 65,000 policies-in-force during 2010, an increase of 8 percent, according to the company.

The transaction has been approved by both companies’ boards of directors and is expected to close in fall 2011. The transaction is subject to regulatory and other customary closing conditions, including review by antitrust authorities and state regulators.

White Mountains Chairman and CEO Raymond Barrette said the online insurance operation Allstate is acquiring has grown from a start-up to rank among the top online insurers in 10 years. “We have happily invested significant capital in what we believed was a unique business. Allstate agrees and can now take it to a new level,“ Barrette said.