Medtronic Inc. said Thursday that it has agreed to acquire ATS Medical Inc. of Plymouth for $370 million.

But buried in documents filed with the Securities and Exchange Commission is an added caveat offered by the Fridley-based suitor: It will lend ATS as much as $30 million to help the company redeem notes due in 2025, repay outstanding borrowings on a loan, and finance working capital. Or, if the agreement is terminated, the loan can be used for general corporate purposes. Payments will be due monthly and carry an annual interest rate of 10 percent, documents state.

The entire unpaid principal balance, with interest, will be due 24 months following the termination of the merger agreement "for any reason."

In addition, the merger agreement calls for ATS to pay Medtronic a $13 million termination fee "under specified circumstances."

On Thursday, Medtronic said it will pay $4 a share in cash for each share of ATS stock. Shares of ATS surged on the news, but closed down just a penny on Friday at $3.98. Medtronic's stock closed at $43.69, down 15 cents.

JANET MOORE