A Somerset County contractor was charged Thursday with perjury after text messages proved he had ordered roof repairs that left two men seriously hurt.

Robert Riley, 42, of Far Hills, lied during proceedings before the U.S. Department of Labor, Occupational Safety and Health Administration (OSHA), according to U.S. Attorney Craig Carpenito.

Riley owns RSR Home Construction in Bernardsville. He became the subject of an OSHA safety investigation in 2018 after two incidents on the same job in which workers fell from a roof and were seriously injured.

The workers had been ordered by Riley to do roof repairs on a Morris County horse stable in the Long Valley section of Washington Township without proper training or safety equipment, according to documents filed in the case and statements in court.

Riley testified under oath during his OSHA deposition that he never authorized anyone to perform roof repairs. However, text messages from Riley reveal that he instructed the roof work that led to each of the accidents.

The criminal complaint said that in May 2018, Riley sent the text "Ok. ... They can get on the roof now" to one of his employees. The next day, a construction worker fell through the skylight of the stable and suffered serious injuries.

Two months later in July 2018, the complaint said, Riley sent the text "I would like to start removing the broken skylight. We have to replace it. Let's see how to remove it." That afternoon, a second worker fell through the skylight of the stable and suffered serious injuries.

If convicted, the perjury charge carries a maximum potential penalty of five years in prison and a $250,000 fine.

Riley was scheduled to make his initial appearance Thursday afternoon before U.S. Magistrate Judge Mark Falk in Newark federal court.

More from New Jersey 101.5:

Sign up for the NJ1015.com Newsletter

Get the best of NJ1015.com delivered to your inbox every day.