A government task force is preparing legislation that would pressure companies such as Facebook and Google to enable law enforcement officials to intercept online communications as they occur, according to current and former U.S. officials familiar with the effort.

Driven by FBI concerns that it is unable to tap the Internet communications of terrorists and other criminals, the task force's proposal would penalize companies that failed to heed wiretap orders, court authorizations for the government to intercept suspects' communications.

Rather than antagonizing companies whose cooperation they need, federal officials typically back off when a company is resistant, industry and former officials said.