Rep. Mike Honda (D-Calif.) and former Obama administration official Ro Khanna (D) will face off in next fall's elections.

The Associated Press has called the all-party primary for Honda, who had 51 percent of the vote, and Khanna, who had 26 percent of the vote with 18 percent of precincts reporting.

Both candidates were expected to advance in the heavily Democratic district. But Khanna had to spend heavily to make sure he placed ahead of Republican Vanila Singh, who had 16 percent of the vote.

The race pits Honda, the Democratic establishment favorite and a civil rights icon, against Khanna, who has backing from a number of Silicon Valley entrepreneurs.

The Democratic Congressional Campaign Committee praised Honda's margin, with DCCC chairman Steve Israel (N.Y.) saying in a statement that "Mike is the ideal leader for the Bay Area, and has an unparalleled record of delivering results in education, innovation and helping to rebuild the middle class."