A folding metal gate, designed to keep intruders out of the cockpit while the main door is open, is being removed from new Boeing 787 planes bought by United Airlines, according to The Associated Press. A pilots union is protesting the removal, citing the extra barrier as a necessary security measure.

United is paying extra to have these gates removed, according to a letter from the Air Line Pilots Association to the airline obtained by AP on Tuesday.

Although Federal rules do not require these dates, United has them on its 777s. Most U.S. airline planes do not have the gates. 

A part of cockpit security, these gates are used especially on longer flights, when the main cockpit door has to be opened so the pilots can go to the lavatory or bunks while other pilots fly the plane. The secondary barrier blocks access from the passenger cabin to the cockpit even when the door is open, the article says.

A United spokesperson, Christen David, said that the secondary barriers are just one component of flight security, and the combination of security measures can vary from one type of plane to the next. She did not discuss the barriers in detail, the article reports. 

United expects to get at least five of the new 787s this year, according to AP.