(Adds comments from family attorneys, updates Boeing share price, adds prior comments from judge in paragraphs 4, 10-18)

* Boeing's planned guilty plea could impact its ability to secure government contracts

* Boeing to pay $243.6 million fine, invest $455 million in safety and compliance

* Families of crash victims oppose plea deal, call for public trial

WASHINGTON, July 8 (Reuters) - Boeing is in talks with the U.S. Defense Department over how the planemaker's planned guilty plea could affect its extensive government contracts, a person briefed on the matter said. Late on Sunday, the Justice Department said in a court filing that Boeing had agreed to plead guilty to a criminal fraud conspiracy charge to resolve an investigation linked to two 737 MAX fatal crashes in 2018 and 2019 that killed 346 people.

Boeing and the Defense Department did not immediately comment on Monday.

Boeing shares, which were up more than 3% in early trading, pared gains to trade up 0.6% at $185.97 on Monday afternoon. A guilty plea potentially threatens the company's ability to secure lucrative government contracts with the likes of the U.S Defense Department and NASA. The final details of the plea deal are expected to be filed by July 19.

Boeing's defense and space unit is vital to its business, with $7 billion in first-quarter sales, up 6% from a year ago. Boeing in its annual report said U.S. government contracts represented 37% of its revenue last year including foreign military sales. A government report said Boeing had $14.8 billion in Pentagon contracts in 2022.

Still, the financial costs tied to the plea appeared "manageable relative to the company’s scale and overall obligations," said Ben Tsocanos, airlines director at S&P Global Ratings.

"We expect that Boeing will likely continue to be a key supplier of defense and space products following the guilty plea," he said.

As part of the plea deal, Boeing will pay a criminal fine of $243.6 million. Boeing has also agreed to invest at least $455 million over the next three years to strengthen its safety and compliance programs, have the Justice Department appoint a third-party monitor to oversee the firm's compliance, and to make annual reports to the Department of Justice.

On Monday, the Justice Department opposed a bid by the families of those killed to force the government to immediately appoint a monitor that would oversee Boeing for five years. DOJ said it generally takes "a number of months to identify a qualified slate of candidates, vet them, and make a considered choice."

Family members intend to appear at a future hearing to object to the plea deal that would require Boeing to admit to making misstatements to the Federal Aviation Administration.

"Through crafty lawyering between Boeing and DOJ, the deadly consequences of Boeing’s crime are being hidden,” said Paul Cassell, an attorney for the families. He called for "a public trial, so that all the facts surrounding the case will be aired in a fair and open forum before a jury."

U.S. District Judge Reed O'Connor, who will decide whether to accept the plea, previously ordered Boeing publicly arraigned on the charge last year.

Boeing is set to plead guilty to making knowingly false representations to the FAA about having expanded a key software feature used on the MAX to operate at low speeds that was tied to both fatal crashes.

In 2023, O'Connor leveled harsh criticism at Boeing, citing what he called the planemaker's "egregious criminal conduct" and adding, "Boeing’s crime may properly be considered the deadliest corporate crime in U.S. history."

O'Connor said last year he was limited in what actions he could take after families asked him to tear up the deferred prosecution agreement. "Had Congress vested this court with sweeping authority to ensure that justice is done in a case like this one, it would not hesitate," he wrote.

U.S. Senator Tammy Duckworth said on Monday that despite the expected guilty plea, "regardless of the DOJ’s efforts, Congress must not let up on its own oversight of both Boeing and the FAA, and that is something I plan to continue to pursue."

Boeing’s bonds were trading higher Monday and demand for them had increased. The credit spreads, or the premium companies pay over Treasuries, on Boeing’s bonds were trading slightly tighter than their levels last week, according to data from BondCliq which tracks secondary trading of corporate bonds.

(Reporting by David Shepardson in Washington, additional reporting by Allison Lampert in Montreal and Shankar Ramakrishnan in New York; Editing by Deepa Babington and Matthew Lewis)