a semiconductor device includes a pillar - shaped silicon layer on a fin - shaped silicon layer . a gate insulating film and a metal gate electrode are around the pillar - shaped silicon layer and a metal gate line extends in a direction perpendicular to the fin - shaped silicon layer and is connected to the metal gate electrode . a contact resides on the metal gate line and a nitride film is on an entire top surface of the metal gate electrode and the metal gate line , except for the bottom of the contact . a vertical thickness of the nitride film relative to the substrate is greater than a horizontal thickness of the nitride film on the sidewall of the metal gate electrode and gate line relative to the substrate .