A safety rail and a connector for adjustably attaching an end piece to a tubular bar of the type used in safety rails. The end piece has a recess adapted to receive an end of the tubular bar and an opening for receiving a screw which passes through the end piece into the bottom of the recess to engage in the connector. The connector includes a crossbar having a lug at each of its ends. The lugs extend outwardly for attaching the connector to an inside surface of the bar. An integral tubular portion of the connector extends inwardly from the crossbar to define a threaded opening to receive the screw for drawing the end pieces to the bar. Each of the ends of the rail has one connector and one end piece.