Netflix and Comcast Corp. resolved long-standing differences Sunday in an agreement that will drastically improve Netflix video streaming into millions of homes, company officials said.

Netflix will now connect directly to Comcast’s broadband network in dozens of locations around the nation instead of streaming its movies and TV content through third-party Internet content-delivery companies that some believe were expensive for Netflix and degraded its service. Comcast is the nation’s largest residential Internet service provider, serving 19 million users.

The Comcast-Netflix arrangement could help Comcast politically in Washington as it seeks regulatory approval of its planned $45.2 billion merger with Time Warner Cable Inc.

Netflix has directly connected its servers loaded with Netflix entertainment content to Comcast’s network in about five locations and that number will increase significantly in coming weeks, which should lead to an “optimized Netflix experience,” sources close to the deal said. Netflix’s video streaming can account for 30 percent of the traffic on the Internet during peak.

Netflix is reportedly negotiating with other Internet service providers, such as Verizon Communications Inc. and AT&T Inc., over how to flawlessly deliver its content over the Internet.

Critics have said the Comcast-Time Warner Cable merger, if approved by federal and state regulators, would consolidate Comcast’s power in the residential Internet market and threaten online companies such as Netflix. Comcast could interrupt or slow Netflix’s streaming of entertainment content to protect its legacy cable-TV business, critics have said. Mark Cooper of the Consumer Federation of America said Comcast could be a “choke point” for online streaming companies.

The new Netflix arrangement is similar, Comcast officials said, to arrangements the huge telecommunications provider has with YouTube, Hulu and Amazon Prime.