We show that in the realm of general relativity a non minimal coupling between the electromagnetic and the gravitational fields may produce an era of accelerated expansion.