A sharply divided U.S. Supreme Court on Tuesday upheld a Pennsylvania law allowing state courts to hear lawsuits against out-of-state companies registered to do business there, even when the alleged injury occurred elsewhere.

In its 5-4 vote decision, the high court ruled in favor of a rail worker who had sued Norfolk Southern Railway Co. in Pennsylvania state court over claims that his exposure to carcinogens working for the company in Virginia and Ohio caused his colon cancer.