The income tax (benefit) expense is as follows (in thousands):
 
Year ended December 31,
 
2016
 
2015
 
2014
Current:
 
 
 
 
 
Federal
$
(958
)
 
$
932

 
$

State
113

 
(10
)
 
7

Foreign
5,865

 
1,424

 

Total current income tax expense
5,020

 
2,346

 
7

 
 
 
 
 
 
Deferred:
 
 
 
 
 
Federal
(7,550
)
 
(34,589
)
 
2,005

State
(31
)
 
(2,506
)
 
177

Foreign
(439
)
 
(1,340
)
 

Total deferred income (benefit) expense
(8,020
)
 
(38,435
)
 
2,182

 
 
 
 
 
 
Income tax (benefit) expense
$
(3,000
)
 
$
(36,089
)
 
$
2,189