I2C and SPI Issue Arduino Mega2560

I have Included these 2 libraries

#include <SPI.h>
#include <Wire.h>

I Begin I2C with this Func

Wire.begin();

I am sending following commands on I2C

Wire.beginTransmission(1);
Wire.write(mode);
Wire.write(0);
Wire.write(0);
Wire.endTransmission();

All Works Well Until I Begin Spi like:

SPI.begin();

then I2C doesn't Work

Kindly Help What I am doing wrong ?

The SPI and Wire are independant. They both work. Perhaps you use a chip select that is an I2C pin ? Or you don't have enough ram memory. Or the hardware is wrong connected to the Arduino.

It is not the SPI library and not the Wire library, something else is the cause.