(CNN) Agrochemicals company Monsanto, a unit of Bayer AG, has agreed to pay $10.2 million in fines and plead guilty to spraying a banned pesticide on research crops in Maui, Hawaii, the US Department of Justice said.

Monsanto Co., also the maker of weedkiller Roundup, will pay the fines for storing the pesticide Penncap-M, an "acute hazardous waste" at sites in Maui and Molokai, Hawaii, according the DOJ press release late Thursday.

Monsanto agreed to the misdemeanor offense of using Penncap-M in 2014, even though the company knew that its use was prohibited after 2013 . Penncap-M is considered an "acute hazardous waste." The company also told employees to reenter the area only seven days after the spraying, when it knew that years earlier, 31 days was set as the required amount of time, according to court documents.

"The illegal conduct in this case posed a threat to the environment, surrounding communities and Monsanto workers," said United States Attorney Nick Hanna.

Monsanto parent company Bayer apologized in a statement, saying, "we did not live up to our standards or the law," but that Monsanto had reported the spraying to the Hawaii Department of Agriculture.