The House has passed a "clean" bill to fund the Department of Homeland Security through September, sending the bill to President Obama and averting a partial shutdown of the department. The vote was 257-167.

LOS ANGELES (CNN) --A Los Angeles judge Thursday ruled that actor Robert Blake will face trial in the slaying of his wife, Bonny Lee Bakley, saying he "had the motive and the opportunity" to carry out the crime.

Los Angeles Superior Court Judge Lloyd Nash issued his ruling after two weeks of testimony in a preliminary hearing in which three witnesses testified Blake had approached them to "pop," "snuff out," or "dispose" of his pregnant wife.

Nash set bail at $1.5 million, just moments after expressing doubt that he could set bail in such a case.

"I'm ordering that Mr. Blake be confined to one residence, he have electronic monitoring, and that he surrender any passport he may have, and he is not to leave the residence," Nash told the court.

The decision shocked members of Bakley's family, who had hoped Blake would remain jailed throughout the trial.

"I can tell you that nobody in the Bakley family wanted Mr. Blake to walk out of court today," Bakley family attorney Eric Dubin said afterward. "I've never seen a judge switch opinions so abruptly."

Dubin said he is concerned that if Blake posts bail the actor could harm "anybody involved in the case or the Bakley family."

Nash also ruled that an alleged co-conspirator, Blake bodyguard Earle Caldwell, will face trial, although the judge added that he did not believe there was proof "beyond a reasonable doubt" for a jury to convict Caldwell.

Caldwell is charged with conspiracy to commit murder. He has been out on $1 million bail. Blake put up the money for Caldwell's bail.

Before the judge issued his rulings, attorneys and prosecutors gave their closing arguments, with Blake attorney Thomas Mesereau Jr. saying there is no witness to the shooting or evidence to support the prosecution's contention.

"There is no evidence about what happened when Bonny Lee Bakley was shot," he said.

Mesereau said the three key prosecution witnesses "lack credibility."

Prosecutor Pat Dixon said Blake "repeatedly told people exactly what he was going to do and he carried it out and he did it."

"This was an execution, not a robbery," Dixon said. "In every scenario Blake suggested it was an ambush and that's exactly what happened."

Bakley shot in the head

Blake, 69, is charged with murder in the May 4, 2001, fatal shooting of Bakley, 44, who was shot in the head as she sat in their car outside a Studio City restaurant where they had just dined.

Among those who testified at the preliminary hearing was Ronald Hambleton, a retired Hollywood stunt man who worked with Blake in the hit 1970s television show "Baretta."

Hambleton told the court that Blake approached him to "snuff out" Bakley.

The hearing also featured a dramatic phone conversation in which Blake accused a sobbing Bakley of intentionally getting pregnant, though she promised him that would never happen.

"That's the kind of lie that God looks down and says, 'Hey, wait a minute. Wait a minute.' That's a big, awful, mean, vicious lie," Blake said. "For the rest of your life you will have to live with that, and for the rest of my life I'll never forgot it."

After Thursday's hearing, Deputy District Attorney Greg Dohi said the testimony from the witnesses was key.

"At the end of the day, the judge, relying largely on what they had to say, found sufficient evidence to hold the defendants to answer," Dohi said.