Canon U.S.A. Inc. has bought a nearly 20 percent stake in a Massachusetts health care technology company for $40 million.

Melville-based Canon U.S.A. said Thursday it paid the closing market price of $6.56 a share in a private placement that closed Wednesday, giving it a 19.9 percent share of T2 Biosystems, Inc., which makes genetic tests and other diagnostic products.

Shares of T2 rose 14.8 percent Thursday to close at $7.46 on the Nasdaq Stock Market.

Canon U.S.A. has been extending its reach into health care technology as its Japanese parent company, Canon Inc., has seen declining sales of digital cameras, printers and copiers. Canon already produces medical imaging equipment for procedures including X-rays and eye scans.

More than a year ago, Canon U.S.A. launched a Melville-based subsidiary called Canon BioMedical Inc., which focuses on biomedical research and health care.

Canon U.S. Life Sciences, Inc., a wholly owned subsidiary of Canon U.S.A., has been working with T2 Biosystems since early 2015 to develop a diagnostic test for Lyme disease.

advertisement | advertise on newsday

Seymour Liebman, executive vice president, chief administrative officer and general counsel of Canon U.S.A, will join T2’s board of directors.

T2 and Canon U.S.A. “look forward to bringing future innovative diagnostic products to market that can improve patient health,” Joe Adachi, chairman and chief executive of Canon U.S.A., said in a statement. He called the investment in T2 “another example of Canon’s commitment in healthcare.”

T2’s chief executive, John McDonough, said in a statement that Canon’s investment “will help us continue to strengthen our business and accelerate our efforts to bring new products to market.”