Prince George's County and the county police union have reached a new three-year contract agreement, it was announced yesterday.

The agreement calls for a 6 percent pay raise retroactive to July 1, 1980, when the previous contract expired, followed by a 7 percent increase this year and 7 percent for the fiscal year beginning July 1982. Ratified by the 825-member union on Thursday night, the contract was the product of 20 months of sometimes bitter negotiations.

Both sides had expected the negotiations to continue and the agreement reached Thursday afternoon came as a surprise.

"I can't say what caused the breakthrough," said Lawrence Hogan Jr., an aide ot his father, County Executive Lawrence Hogan. "The negotiations this week did seem to move up to a new level, much more serious on both parts with less hollering and screaming. I'd like to congratulate the negotiators on both sides on how they handled themselves."

The agreement was announced on the same day that a new law requiring binding arbitration for police and firefighters contracts took effect. Under the law, the result of a charter amendment passed last November, Hogan was required to submit three names to the County Council to serve as arbiters. The executive had strongly opposed the law and was considering a possible court challenge but decided to comply, the younger Hogan said.

Two weeks ago the police officers overwhelmingly rejected a county offer of a retroactive 6 percent raise and a freeze on salary increments based on the amount of college-level courses taken. Union officials said they wanted an 8.5 percent raise for last year and an increase equal to the consumer price index for this year.

The new agreement, while differing in some details, also freezes the education benefits at the existing levels and eliminates the feature for new police officers, according to the younger Hogan.

Union chief Laney Hester said that while the new contract is identical in many respects to the one rejected, it contains more merit steps for longevity, a doubled night-shift differential and other benefits equivalent to almost a 30 percent increase over three years.