ABERDEEN, S.D. (AP) — A Minnesota company will take over two bankrupt dairies at Veblen in northeast South Dakota.

The American News reported that Riverview LLP will assume management immediately after a bankruptcy judge approved a purchase agreement late last week.

The two dairies, known as Veblen East and Veblen West, will be renamed Marshall Dairy. Riverview said they can produce nearly 28 million gallons of milk annually.

Riverview, based in Morris, Minn., oversees about 30,000 cows at other dairies in South Dakota, Minnesota and Nebraska.

According to court paperwork, Riverview agreed to buy the dairies from AgStar Financial Services, the prime financier of the dairies, and the group that would have likely owned the dairies had a buyer not been found.