Lawrence J. Hogan, the Republican executive of Prince George's County, spread the word yesterday that he will run for the U.S. Senate next year rather than seek reelection to his county post.

Hogan, ending months of public indecision about his political future, said in an interview in his Upper Marlboro office that the chance to run against incumbent Democratic Sen. Paul S. Sarbanes in 1982 was "a window of opportunity that doesn't open up very often."

He said he had already met with the Republican Senate Campaign Committee, contacted a campaign consultant and discussed the move with his family and staff. Yesterday, Hogan telephoned state GOP leaders and U.S. Rep. Marjorie S. Holt, his toughest potential primary opponent, to inform them of his decision.

"He said he wanted to let me know he was going to run for the Senate," said Holt. "He said he would be very gentlemanly [in a primary battle.] It's tough not to be when you're running against a lady."

Holt has not yet said she will definitely run for the Senate and has spent the last nine months trying to determine whether Sarbanes is as beatable as the GOP leadership believes.

National Republican officials have put Sarbanes at the top of their 1982 hit list and promised to spend $250,000 to defeat him. The liberal Baltimore Democrat has also been targeted by the National Conservative Political Action Committee, which earlier this year ran a series of negative radio spots about Sarbanes.

After yesterday's call from the feisty Prince George's executive, Holt reiterated that she is still keeping her options open, weighing the chances of winning election in overwhelmingly Democratic Maryland. "I don't want to commit hari-kari," she said, adding that the House Republican leadership would like her to keep the 4th District seat Republican.

Hogan, who represented Prince George's in Congress from 1968 to 1974 and won the county executive's job by a landslide in 1978, was unsuccessful in his only previous bid for statewide office. In 1974, he ran for governor and lost in the Republican primary to Louise Gore after he publicly supported impeaching President Nixon during the Watergate hearings.

Hogan and his closest political associates say a statewide primary race would be different this time since the Watergate years have receded from the minds of Republican voters. In addition, Hogan has made good use of his post as Republican National Committeeman by traveling around the state and expanding his connections among party regulars.

At the same time, Hogan acknowledged that Holt, who has represented Anne Arundel and southern Prince George's in the House since 1972, would be a tough opponent because her base of support and political beliefs are similar to his own.

"We've both agreed that it would be stupid to run against each other," Hogan said yesterday. According to Gerard Holcomb, one of Hogan's closest political allies, Republican pollster Lance Tarrance will be doing a poll in the next week or so to determine how tough a primary opponent Holt would be.

Holt says she has poll figures taken last spring that show her an easy winner in a multicandidate field.

Hogan's tentative decision to run for Senate, a decision that Holcomb said could change if their own poll results agree with Holt's, followed several months of indecision about his future in politics.

For much of this year Hogan was unable to narrow his 1982 alternatives -- running for senator, governor, or seeking almost certain reelection to county executive. For a while, Hogan even considered retiring from politics because of an extremely bitter and unsuccessful congressional race by his son Lawrence Jr. that brought into sharp focus his own problems with many GOP politicians.

Hogan apparently abandoned that possibility after a quiet summer in which he avoided the limelight and almost all public comment, according to Holcomb.

Then, about two weeks ago Hogan was told by officials at the Republican Senate Campaign Committee that their polls showed Sarbanes to be the most vulnerable senator in the United States, according to Larry Hogan Jr.

This assessment, a feeling that it will be difficult to unseat Democratic Gov. Harry Hughes and the promise of a well-financed race against Sarbanes pushed Hogan to choose a Senate race.

Finally yesterday the unofficial word went out to Maryland's GOP leaders.

"The primary is a year from today and it's time to get moving," said Hogan's son. "If you keep people guessing forever, the support will go someplace else."

By yesterday evening, Hogan was setting off on the campaign trail to deliver an anti-Sarbanes speech in Baltimore County.