What's the best strategy to win a tic-tac-toe variant on a 5x5-board?
This is a generalized version of @Guvante's answer.

O (player 2) always wins in 4. The diagonals are not necessary to achieve a win.

Examples are included in bold, but this strategy works for all choices made by X.


X places a piece at (a,b): (1,1)
O chooses a row that is not a, and places two pieces in that row, but not in column b: (2,2) and (2,5)
Now, O is attacking on the chosen row (2), and on two columns (2 and 5). X will have to defend against one of these three attacks: (2,3)
O chooses a free row and places two pieces above or below his previous pieces: (5,2) and (5,5)


This is what the board looks like at this point:

 X1|  |  |  |  
   |O1|X2|  |O1
   |  |  |  |  
   |  |  |  |  
   |O2|  |  |O2


Now O has 3 different attacks going on. In our example these are row 5 and columns 2 and 5. X can block one of these, and O can expand the other two to three-in-a-rows. Then X can block one of those, and O completes the other. Game over.

Since this is done in 4 moves, there's no risk of X getting 5 in a row so this is of no concern.

EDIT: step by step images, colors depict dominance.