An object is to provide a semiconductor device having stable electric characteristics in which an oxide semiconductor is used. An oxide semiconductor layer is subjected to heat treatment for dehydration or dehydrogenation treatment in a nitrogen gas or an inert gas atmosphere such as a rare gas (e.g.,...http://www.google.de/patents/US8193031?utm_source=gb-gplus-sharePatent US8193031 - Method for manufacturing semiconductor device